RSS Feed
jun 18

Making objdump -S find your source code

Posted on mandag, juni 18, 2012 in Planet Ubuntu-DK, Ubuntu, University

We all know the situation: We want to disassemble the most awesome pre-compiled object file, with accompanying sources, using objdump and we would like to view the assembly and C-code interleaved, so we use -S. Unfortunately, objdump fails to find the sources, and we are sad 🙁

How does objdump look for the sources? Normally the paths are hardcoded in the object file in the DWARF information. To inspect the DWARF debug info:

$ objdump --dwarf myobject.o | less

and look for DW_TAG_compile_unit sections, where the paths should exist like:

<25> DW_AT_name : C:/ARM/myfile.c

Of course, this might not be the path you have on your machine, and thus objdump gives up.

However, we can use an undocumented option to objdump: the -I or –include:

$ objdump -I ../mysources -S myobject.o | less

and voila, objdump finds the sources, inlines the C-code, and everything is awesome!

dec 12

WordPress – mildly impressed

Posted on fredag, december 12, 2008 in Planet Ubuntu-DK, Sysadmin'ing, Ubuntu, University

So, I just installed WordPress, because I was starting to have a too long mental list of things that I considered “blog-able”. My current estimate of what I will be blogging about is: Sysadmin’ing on a tight budget, Ubuntu Linux, MultiADM, various happenings in the Open Source world, and probably a bit about my everyday life as a student of Computer Science at Aalborg University, Denmark.

But back to the title of this post. For various reasons I have previously preferred other blogging software (primarily blogging software integrated with Typo3), but I finally gave in and installed WordPress. I deemed that I was simply missing out on too much: trackbacks, tags, anti-spam measures for comments. All this warranted a separate blogging system, and WordPress is pretty much the no. 1 blogging system in use.

My experience with it so far: Installation was okay, but it could have told me that the reason I didn’t get the fancy install-wizard was because I had forgot to give permissions for WordPress to modify its files. Minor nitpick: I decided to move my installation from /wordpress to just /. This resulted in all links still pointing at /wordpress. After a little detective work, and phpMyAdmin to the rescue to alter a couple of rows, and everything was working again.

But overall it seems WordPress is a pretty capable and extendable, and has a nice Web 2.0-like user interface. I’m pretty sure I will grow accustomed to it over time.