This is the mail archive of the gdb@sourceware.cygnus.com 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]

Running the inferior from breakpoint commands



What's the deal with breakpoint commands that run the debuggee?  Does
it work on Unix?

One of the tests in gdb.base/commands.exp sets a breakpoint with the
following command list:

  step
  step
  step
  step
  bt

The test script expects the steps to work except on HPPA, where only
the first step is supposed to do its thing.  What is special about
HPPA, and does this test work fully on other Unix systems?

The DJGPP version seems to behave like HPPA (I'm not sure whether this
is a compliment, and if so, to which of the two systems ;-).  However,
I stepped through the code that is involved, and I don't see anything
DJGPP-specific there.

It seems like bpstat_do_actions notices that the debuggee proceeded as
the result of a breakpoint command, and switches to use the new bpstat
chain created when the program stopped.  However, the previous bpstat
chain is nuked and forgotten forever by `proceed' and its subroutines,
and I don't see any code that would resurrect that chain.  So I cannot
understand how could that work on any system.  Am I missing something?

(If this is a general problem, I do have a plan how to make it work.
I even coded it and it seems to work--well, almost, as it still
crashes in one of the cases I tested it, so I obviously have some more
work to do...)

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