This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/PATCH] breakpoint.c: fix until command

Michael Snyder formulates:

1) Use find_pc_partial_function to determine bounds and
distinguish between in-bounds and out-of-bounds locations.
2) For func_start > loc >= func_end, use a frame-relative bp.
3) For func_start == loc or loc < func_start or loc > func_end,
use a frameless bp.
This doesn't work. It hightlights why the edge condition can't be cleanly resolved. You can't rely on ``func_start == loc'' as an identifier of this special case. The prolog analysis / skip will just make the behavior confusing / conunter intitive and the doco really messy. Look at the heated debate that occures with ``break foo'' vs ``break *foo'' vs ``break lineof(foo)''.

Consider for instance:

(gdb) break foo
(gdb) c
Break point foo reached
(gdb) until foo

depending on the prolog analysis (and hence the architecture), this will behave differently.

I personally think the decision reached several months ago should stand - `until foo' behaves per the documentation.

We can then separatly persue a recursive centric version of the function vis:

- finish LOCATION
- rbreak
(set tempoary breakpoint at return address)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]