Re: gdb: Symbolized Crash Report: One line spans multiple functions?
Re: gdb: Symbolized Crash Report: One line spans multiple functions?
- Subject: Re: gdb: Symbolized Crash Report: One line spans multiple functions?
- From: Jerry Krinock <email@hidden>
- Date: Mon, 28 Dec 2009 19:03:04 -0800
On 2009 Dec 28, at 16:29, Jason Molenda wrote:
>
> On Dec 28, 2009, at 3:55 PM, Jerry Krinock wrote:
>
>> Line 97 of "/Users/jk/Documents/Programming/Projects/Project1/ExtoreG+Loginner.m" starts at address 0xeb12d <-[ExtoreG(Loginner) logInWithInfo:]+884> and ends at 0xeb135 <-[ExtoreG(Loginner) errorLoggingIn]>.
>
> Are you running the debugger on a .o file? Or a dylib/bundle that hasn't been slid to its actual address?
Thank you, Jason. It's a private framework. I've loaded the framework using the 'file' command, and subtracted out the "slide"; see below.
(gdb) set sharedlibrary preload-libraries no
(gdb) file Project1.app/Contents/Frameworks/Bkmxwork.framework/Bkmxwork
> It's uncommon for any executable code to be at 0xeb12d. If you're trying to understand what happened in a crash report you need to subtract out the slide of the function addresses if you're looking at a 0-based dylib/bundle. But you probably already did all of this.
Yes, the slide was 0x6000. From the report's Binary Images:
0x6000 - 0x120fe7 +com.myCompany.Bkmxwork ??? (0.7.0)
And from otool output:
vmaddr 0x00000000
slide = A - I = 0x6000 - 0x00000000 = 0x6000
0x6000 is also shown in the call stack in the Crash Report:
2 com.myCompany.Bkmxwork 0x000f112d 0x6000 + 962861
I'm using the same procedure as I always do, which usually works. Here's how I got there:
(gdb) p/x 0x000f112d-0x6000
$2 = 0xeb12d
(gdb) info line *$2
Line 97 of "/Users/jk/Documents/Programming/Projects/Project1/ExtoreG+Loginner.m" starts at address 0xeb12d <-[ExtoreG(Loginner) logInWithInfo:]+884> and ends at 0xeb135 <-[ExtoreG(Loginner) errorLoggingIn]>.
> Could this be function inlining?
I haven't declared anything 'inline' in that file. Regular old Obj-C.
> Disassembly of this address range would make it pretty clear if you're familiar with x86 assembly.
I did some of that back in 1978.
> e.g. "disass *0xeb12d" will disassemble the entire function that contains 0xeb12d and may make it more clear what's going on.
(gdb) disass *0xeb12d
No function contains specified address.
> You're looking at a span of eight bytes - it's possible there are two functions abutting each other but it doesn't seem very likely.
On 2009 Dec 28, at 16:25, Ken Thomases wrote:
> I think this is just an issue with describing ranges and their boundaries...
Thank you, Ken. That makes sense.
> Anyway, I suspect gdb means the line generates instructions starting at and including address 0xeb12d and running to, but not including, 0xeb135. Since 0xeb135 is the first instruction of -errorLoggingIn (there's no +xxx after the symbol name)
Yes, no +xxx is weird. So probably no +xxx means xxx=0.
> this just means that line 97 runs until that method but not "into" it.
Indeed, as I said line 97 is the ending curly bracket of the first-mentioned method.
> It's pretty common that functions have no-op instructions between them, which would normally avoid this adjacency, but maybe you just got unlucky.
Well, that makes sense. But the following doesn't. disass seems to think that the whole area is vacant. Completely inconsistent with the output from 'info line' (see above).
(gdb) disass *0xeb12c
No function contains specified address.
(gdb) disass *0xeb12d # Begin "Line 97"
No function contains specified address.
(gdb) disass *0xeb12e
No function contains specified address.
(gdb) disass *0xeb12f
No function contains specified address.
(gdb) disass *0xeb130
No function contains specified address.
(gdb) disass *0xeb131
No function contains specified address.
(gdb) disass *0xeb132
No function contains specified address.
(gdb) disass *0xeb133
No function contains specified address.
(gdb) disass *0xeb134
No function contains specified address.
(gdb) disass *0xeb135 # End "Line 97"
No function contains specified address.
(gdb) disass *0xeb136
No function contains specified address.
(gdb) disass *0xeb137
No function contains specified address.
(gdb) disass *0xeb138
No function contains specified address.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden