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]

gdbstub initial code, v12

Changes: fully implement g/G/p/P. Well, allmost.

I didn't expect this is so hairy. And, unfortunately, all
this code is x86 specific. I tried to avoid this very much,
but failed.

Also, it doesn't really support FPU. gdb has its own idea
about FPU regs and uses struct i387_fxsave. I failed to
understand i387_fxsave_to_cache/i387_cache_to_fxsave,
probably I'll simply copy-and-paste this code later.
Right now $G doesn't change FPU registers. $P does, but
mostly incorrectly.

Why gdb doesn't use $p after $P? It always fetches all
registers via $G, I don't even know how can I test $p.
Perhaps because gdbserver doesn't implement p/P.

Btw, I didn't veryfy this, but gdbserver looks obviously
wrong wrt 64/32 bit support. "struct reg *reg_defs" is global,
it is initalized by ->arch_setup() when we attach the first
inferior (or a new one after detach). But every inferior
needs its own reg_defs, I think. Otherwize even the simplest
x86_fill_gregset/x86_store_gregset can be confused.

Next: watchpoints.


Attachment: ugdb.c
Description: Text document

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