This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: binutils sim breakpoint support


Hi William,

> What must be implemented within binutils sim such that when GDB use it
> as a target, it can recognize a breakpoint.

The sim is part of GDB, rather than the binutils.  (Even though the
source repository is shared by both projects).  Thus you will be better
off asking this question on the gdb mailing list.

> In fact, within the simulator function sim_engine_run(), when the
> breakpoint instruction is decoded, I am using the following to report
> SIM_SIGTRAP
> 
> sim_engine_halt (sd, scpu, NULL, pc, sim_stopped, SIM_SIGTRAP);

This is correct.

> However GDB fail printing the following in its console:
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 0x00000000 in ?? ()

This is presumably because you are not implementing a handler
for the SIGTRAP signal in your simulator.  You probably need
to define the SIM_CORE_SIGNAL macro and point it at a suitable
piece of code.

Cheers
  Nick





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