[Barrelfish-users] Debugging symbols

Simon Peter speter at inf.ethz.ch
Mon Jun 4 16:39:35 CEST 2012


How do you know you're debugging /sbin/netd?

A common problem we faced with simulator debugging is that the debugger 
does not know it is debugging user code multiplexed by an operating 
system, so it would just stop at the specified location whenever the 
instruction pointer ends up there.

A good way to check is to look at your stack. Does it show a valid call 
chain for the binary you expect to debug?

Simon

On 04.06.2012 13:45, Patrik Eklöf wrote:
> Well, I haven't been able to fully get symbolic debugging to work, so I can't say specifics I am missing which I need, but I have noticed some symbols missing, so I am going to use them as an example.
>
> At address 0x00000000004028d1, /source/usr/netd/idc_barrelfish.c seems to be loaded (so /sbin/netd then).
> The very first assembly instruction I see is call 0x46d270, which jumps into some unknown location.
>
> [cpu0] cs:0x000000000046d270 p:0x0005be6270  push rbp
> interdisp_ump_send_handler () in interdisp_flounder_bindings.c
> simics>  whereis -d 0x000000000046d270
> Address 0x46d270 is not in any known location.
>
> At this point, it seems to mess up. It LOOKS like some information is missing, but I can't be sure, so I figured I'd ask.
> I can't see any source for this location and I seem to be unable to get any information about what source file and line it's associated with.
> At this point, symbolic debugging just breaks down. It stops working correctly.
>
> I haven't yet tried gdb, however (have not been able to get it to read symbols from the binaries; it complains it can't read them).
> This is sort of a little game where I have to find out if the culprit is the simulator or the OS.
> So this may be a little premature, and if so, I apologize.
>
> Regards,
> Patrik Eklöf
> Student at ICT, Master of Science in Engineering Education, IT Programme, KTH, Kista
>
> ________________________________________
> From: Kornilios Kourtis [kornilios.kourtis at inf.ethz.ch]
> Sent: Monday, June 04, 2012 13:03
> To: Patrik Eklöf
> Cc: barrelfish-users at lists.inf.ethz.ch
> Subject: Re: [Barrelfish-users] Debugging symbols
>
> Hi Patrik,
>
> On Mon, Jun 04, 2012 at 08:29:08AM +0000, Patrik Eklöf wrote:
>> Hi all,
>>
>> I am trying to get debugging symbols for entire Barrelfish in order to
>> debug in more easily.  I managed to load symbols from all the
>> executables in /sbin, but it doesn't seem to be all of them. Some are
>> missing, such as the libraries (reent is one of them, I think).  So my
>> questions are as follows: Do I have to do something more in order to
>> produce debugging symbols for all the source code than just compiling
>> Barrelfish with the default settings?  What other files, if any, should
>> I load symbols from, other than /sbin in order to get all the debugging
>> symbols for the entire BF?
>
> Since in barrelfish libraries are not dynamically loaded, all debugging
> symbols should be in the binaries themselves. What are the symbols you
> seem to be missing?
>
> cheers,
> Kornilios.
>
>
> --
> Kornilios Kourtis
>
> _______________________________________________
> Barrelfish-users mailing list
> Barrelfish-users at lists.inf.ethz.ch
> https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users




More information about the Barrelfish-users mailing list