-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.xml
153 lines (109 loc) · 10.6 KB
/
index.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Varun Agrawal</title>
<link>http://varun729.github.com/hugo/</link>
<description>Recent content on Varun Agrawal</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 07 Sep 2016 22:25:26 -0400</lastBuildDate>
<atom:link href="http://varun729.github.com/hugo/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Using WinDbg-1</title>
<link>http://varun729.github.com/hugo/post/using-windbg-1/</link>
<pubDate>Wed, 07 Sep 2016 22:25:26 -0400</pubDate>
<guid>http://varun729.github.com/hugo/post/using-windbg-1/</guid>
<description>
<p>Behind all the UI of Windows, there still exists software that is running. And when you are writing software it is bound to break and you want to debug it. GDB on Linux has helped me debug programs. Although, it took me some time to get used to understanding GDB, I am able to understand some of the intrinsics of how it works and can use it for debugging programs. I want to be able to debug Windows programs with the same ability, especially the programs that I write.</p>
<p>I am starting to use WinDbg to debug executables on Windows. I am using my Windows machine to learn and program in Go. While programming, I want to start learning a debugging tool as well, and I find that WinDbg is a good option. This series of articles would be an \&ldquo;experience\&rdquo; article, where I will jot down how I am using WinDbg and the tricks that I am learning. I hope that in a few months, I can do some of the basic debugging tasks on WinDbg with ease even when debugging Go programs.</p>
<h3 id="view">View</h3>
<p>WinDbg is GUI tool that can load an executable for debugging.</p>
<ol>
<li>File &gt; Open Executable&hellip;
<ul>
<li>loads the executable in memory</li>
<li>opens a Command window where we interact with the debugger (step, go, etc.)</li>
</ul></li>
<li>View &gt; Disassembly
<ul>
<li>opens a Disassembly window where the instructions around the current instruction are listed</li>
<li>if we enter a function, the code in the Disassembly windows updates to the code in the function</li>
</ul></li>
</ol>
<h3 id="commands">Commands</h3>
<p>There are several debugger commands to interact with the debugger. I am only listing a few here that I am starting to use.</p>
<ol>
<li>Go (g) : This starts executing the program. This command looks similar to the &lsquo;continue&rsquo; or &lsquo;run&rsquo; command in gdb.</li>
<li>Step Into (t) : This command allows to step into the program. Thus, we execute one instruction at a time. Very useful to analyze problematic code.</li>
<li>Call stack (k) : This command prints the call stack. It is useful to find the control flow.</li>
</ol>
<h3 id="info">Info</h3>
<p>When we load the executable, command window displays the following information:</p>
<blockquote>
<p>CommandLine: \&ldquo;####exe_name####\&rdquo;</p>
<p>Symbol search path is: srv*</p>
<p>Executable search path is:</p>
<p>ModLoad: 00000000 00400000 00000000 00677000 <code>image00000000</code>00400000</p>
</blockquote>
<p>Here <code>image00000000</code> is the name of the memory region of the program executable.</p>
</description>
</item>
<item>
<title>Using Inkscape to get PDF images from PDF documents</title>
<link>http://varun729.github.com/hugo/post/using-inkscape-to-get-pdf-images-from-pdf-documents/</link>
<pubDate>Wed, 07 Sep 2016 22:25:19 -0400</pubDate>
<guid>http://varun729.github.com/hugo/post/using-inkscape-to-get-pdf-images-from-pdf-documents/</guid>
<description><p>I use PDF images in my LateX documents. Creating PDF images from Python and gnuplot is trivial because of the rich API features. However, I sometimes generate plots in Microsoft Excel, where images can only be saved as PNG, JPG or other pixel formats and not in any of the vector formats. (Excel on Mac OS X allows saving images in PDF format)</p>
<p>##Workaround
I found a workaround for getting PDF images from Microsoft products. Following are the steps that I use. I am only explaining the steps here in as much detail as text allows.</p>
<p><strong>Step 1.</strong> Export the document in PDF format. The image will be exported as a vector object, but will be part of the parent document. In order to get the image in PDF to use in LateX, we need to do more. If we select the image in Microsoft Excel, and then export the document, then the PDF will only contain the image, but the image will be smaller than the document size.</p>
<p><strong>Step 2.</strong> Open the PDF document in Inkscape. There is an option for \&ldquo;Precision of approximating gradient meshes\&ldquo;, which we set to the maximum or <em>very fine</em>.</p>
<p><strong>Step 3.</strong> Press Ctrl+A to select the image in the document. If there are other contents in the document, delete them by selecting them individually.</p>
<p><strong>Step 4.</strong> After selecting the image, click on \&ldquo;File &gt; Document Properties\&ldquo;. In \&ldquo;Custom Size\&ldquo;, expand \&ldquo;Resize page to content&hellip;\&ldquo;. Click on the button \&ldquo;Resize page to drawing or selection\&ldquo;.</p>
<p><strong>Step 5.</strong> Save the document in Inkscape (we opened PDF, so the PDF will be overwritten). You can also \&ldquo;Save as\&rdquo; another file.</p>
<p>These steps will allow cropping PDF documents to get a PDF image within the document. This is much better than cutting the image after opening the PDF in a PDF document viewer such as Adobe Acrobat viewer.</p>
</description>
</item>
<item>
<title>Using Inkscape to Change Font Colors in PDF</title>
<link>http://varun729.github.com/hugo/post/using-inkscape-to-change-font-colors-in-pdf/</link>
<pubDate>Wed, 07 Sep 2016 22:25:14 -0400</pubDate>
<guid>http://varun729.github.com/hugo/post/using-inkscape-to-change-font-colors-in-pdf/</guid>
<description><p>Inkscape is a pretty handy tool to edit vector graphics. PDF files are vector images, and thus can be edited using Inkscape.</p>
<p>I recently found an image that I generated from Excel, where I forgot to change the font color to black. Now that I have the image in the perfect size, I don&rsquo;t want to go back to Excel and fiddle with the settings all over again. Following are the steps that I take to change the font color.</p>
<p><strong>Step 1.</strong> Open the PDF image in Inkscape with the \&ldquo;very fine\&rdquo; setting in the \&ldquo;PDF Import Settings.</p>
<p><strong>Step 2.</strong> Select the component whose color you want to change, and then select desired color from the Pallette.</p>
<blockquote>
<p>At the bottom of the page is \&ldquo;Pallette\&rdquo; (View &gt; Show/Hide &gt; Pallette, in case you don&rsquo;t see the pallette).</p>
</blockquote>
</description>
</item>
<item>
<title>Halloa Jeeves</title>
<link>http://varun729.github.com/hugo/post/halloa-jeeves/</link>
<pubDate>Wed, 07 Sep 2016 22:24:59 -0400</pubDate>
<guid>http://varun729.github.com/hugo/post/halloa-jeeves/</guid>
<description><p>I do not want to bore you with the details, but I have to tell you the week I spent reading Wodehouse&rsquo;s \&ldquo;My Man Jeeves\&ldquo;. I have not seen many people wandering around with books in their hand, which I think is because I never read many books and so didn&rsquo;t my company. However, I had often seen one person with a book in hand often, and the book I saw was by Wodehouse. I decided then that if I am going to read books ever, I will give this author a try.</p>
<p>The year is 2016, and for some unknown reason, I have started to like reading books and have completed six books so far. I picked up My Man Jeeves in July one day, and guess what the short stories are so amazing that I cannot keep the book down without completing a story. I would read 2 or 3 stories a day, and I finished the book in a week.</p>
<p>Wodehouse definitely had a peculiar style of writing, which is hard to follow, but the context is so well defined that most of things you can understand right from the context. I am looking forward to reading more books by Wodehouse.</p>
</description>
</item>
<item>
<title>Betweeness Algorithm</title>
<link>http://varun729.github.com/hugo/post/betweeness-algorithm/</link>
<pubDate>Wed, 07 Sep 2016 22:24:53 -0400</pubDate>
<guid>http://varun729.github.com/hugo/post/betweeness-algorithm/</guid>
<description><p>Graph theory is interesting. My current project involves improving the performance of graph algorithms by converting memory accesses to random addresses into memory accesses to sequential memory. This improves the memory access latency, and thus improves performance of the application. Because graph algorithms access nearby nodes, sometimes it is not possible to rearrange the memory to make the accesses sequential. For such cases, we can prefetch the memory contents from memory as we perform computation.</p>
</description>
</item>
<item>
<title>About Me</title>
<link>http://varun729.github.com/hugo/post/about-me/</link>
<pubDate>Mon, 05 Sep 2016 02:34:19 -0400</pubDate>
<guid>http://varun729.github.com/hugo/post/about-me/</guid>
<description><p>Hello and welcome to my home page.</p>
<p>I am graduate student in the Computer Science department at Stony Brook University, which is located on <a href="https://goo.gl/maps/2dJP1y1hpy92">Long Island, NY</a>. I am interested in all things pertaining to computers, even if I can only understand parts of it. My current interests are computer microarchitecture, memory hierarchy, operating system design, and algorithms.</p>
</description>
</item>
</channel>
</rss>