problem remote debugging

Brendan Miller catphive@catphive.net
Tue Feb 24 19:52:00 GMT 2009


On Tue, Feb 24, 2009 at 9:08 AM, Daniel Jacobowitz <drow@false.org> wrote:
> On Tue, Feb 24, 2009 at 09:01:11AM -0800, Brendan Miller wrote:
> Yes, really.  I've just tried to explain this... GDB sets breakpoints
> in the target automatically, and reads debug data from the target.  If
> symbols do not match, then it will set the breakpoints at the wrong
> location (which might even be data rather than code), and it will read
> incorrect debug information and make decisions based on that.

Intuitively that seemed wrong to me because if a breakpoint is in the
wrong place, or outside the text segment, then I'd just expect it to
break in a different place, or not at all. I wouldn't expect runtime
execution of the code to take a different path. However, it sounds
like you understand what's going on in the internals a lot better than
I do, so I'll take your word for it.

>
>> > Also, this is a very old GDB - I always recommend trying the latest
>> > (GDB and gdbserver).
>>
>> Is there a known bug that was fixed that would resolve this?
>
> Well, for one thing it'll try to warn you if your libraries don't
> match.

Ok... I'll give that a shot. That would actually be pretty useful
because I'm dealing with a lot of hard to track version skew in my
development environment.



More information about the Gdb mailing list