This is the mail archive of the mailing list for the Archer 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: gdbstub initial code, v9

On Thu, 9 Sep 2010 17:29:37 +0200
Oleg Nesterov <> wrote:

> Currently ugdb only supports non-stop

Could someone explain to me why non-stop (rather than all-stop) is
being focused upon first?

I skimmed the v9 code.  It's good to see that support has been added
for the 'm', 'M', and 'g' commands.  It appears to me that 'G' and 's'
are still missing though.  As discussed by Jan, x86 will need G (or P,
but G is required by the spec whereas P is not), due to the need to
adjust the PC backwards after a break.  (In gdb sources, this is
known as decr_pc_after_break.)

Something else that came to mind while reading this thread is the
issue of cache synchronization.  When writing either breakpoints or
original instructions to memory, it may be necessary to flush the data
cache to memory and invalidate some lines in the instruction cache so
as to not have the CPU execute the instruction that was there prior to
the modification - i.e. you want the CPU to execute the instruction
that was just written to memory, not necessarily whatever it has lying
about it it's cache.  It occurred to me that this could be one reason
for breakpoints not working after implementation of the 'M' command.
(If the kernel calls that you're using already automagically do this, then
ignore this comment...)


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