when one creates a gdb.Breakpoint object, s/he has no control on its pending state: > (gdb) python gdb.Breakpoint('send') > No symbol table is loaded. Use the "file" command. > Breakpoint 4 (send) pending. it would be convenient to 1) specify if we allow or not the breakpoint to be pending 2) remove the two lines written by GDB 3) know whether the breakpoint has actually been set or is pending (I should provide a solution for 3 soon)
the problem about 1) is: (gdb) set breakpoint pending off (gdb) py gdb.Breakpoint("nop") Function "nop" not defined. Breakpoint 7 (nop) pending.
Since gdb 7.12, gdb.Breakpoint has the (read-only) "pending" attribute. Is more needed to resolve this ticket?
(In reply to Hannes Domani from comment #2) > Since gdb 7.12, gdb.Breakpoint has the (read-only) "pending" attribute. > Is more needed to resolve this ticket? AFAIU, it doesn't. This bug is about being able to decide whether to allow pending breakpoints when creating a gdb.Breakpoint. I would imagine a parameter like: gdb.Breakpoint("my_function", allow_pending=True) for example.
*** Bug 12688 has been marked as a duplicate of this bug. ***
Working on a patch.
I belatedly discovered that a breakpoint created from Python is always marked pending. So maybe there's nothing really needed here.
I misread the bug and see it's asking for a "non-pending" option. I guess that makes sense :) The "announce" issue mentioned is addressed here: https://sourceware.org/pipermail/gdb-patches/2022-December/194576.html
I pushed my current hacks to my github, branch "submit/pr-py-12816-pending". Needs rebasing and probably other work.