[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems in setting breakpoints
From: |
Mark Kettenis |
Subject: |
Re: Problems in setting breakpoints |
Date: |
30 Jul 2001 16:11:49 +0200 |
address@hidden writes:
> Hello,
>
> When a user tries to put a breakpoint on a function which exists more
> than once with the same
> name (eg: dlopen in libdl.so), gdb sets the break point only on the one at
> the highest address.
> This may not be the one that gets linked in the user's program. So, in
> effect, gdb will not stop at the
> place where the user wanted.
It's even worse with variables.
>
> One solution would be to set break points on all occourances of the
> function name, when the user
> uses the "break function-name" command.
>
> Is this the right way to do this. Is there any other ideas?
I don't think it is the right way to solve the problem, and I don't
think it is easy to solve given the current state of the breakpoint
machinery in GDB. As a workaround you can explicitly specify the
source file of the function you want to set the breakpoint at, as in
"break file:function-name".
Unfortunately I don't have a clear idea how to fix this correctly.
Mark