Re: gdbstub initial code, v9

2010-09-09 Thread Tom Tromey
> "Oleg" == Oleg Nesterov writes: Oleg> (gdb) set var 0 You need: set variable var = 0 The "variable" can be abbreviated. FWIW, "print", "set variable", and "call" are basically aliases. "print" just happens to print the result of the expression. Tom

Re: gdbstub initial code, v9

2010-09-09 Thread Oleg Nesterov
On 09/09, Oleg Nesterov wrote: > > Thanks... but I tried this when I tested the fix. > > (gdb) p/x var > $1 = 0x1234 > (gdb) set var > Argument required (expression to compute). > (gdb) set var 0 > (gdb) p/x var > $2 = 0x1234 > > strange ;) Aah. (

Re: gdbstub initial code, v9

2010-09-09 Thread Oleg Nesterov
On 09/09, Jan Kratochvil wrote: > > > Cough... could you tell me how can I change the variable "done" > > without printing it? > > (gdb) help set variable > Evaluate expression EXP and assign result to variable VAR, using assignment > syntax appropriate for the current language (VAR = EXP or VAR :=

Re: gdbstub initial code, v9

2010-09-09 Thread Oleg Nesterov
On 09/09, Frank Ch. Eigler wrote: > Hi - > > On Thu, Sep 09, 2010 at 05:50:47PM +0200, Oleg Nesterov wrote: > > > Probably I need to implement G/P first, otherwise gdb can't change ip. > > Perhaps. > > > Still, I'd appreciate if someone can explain me what gdb needs/expects > > to handle breakpoint

Re: gdbstub initial code, v9

2010-09-09 Thread Jan Kratochvil
On Thu, 09 Sep 2010 18:30:31 +0200, Oleg Nesterov wrote: > OOPS! indeed, unhex() confuses lo and hi. It works for 0xcc, though. > Cough... could you tell me how can I change the variable "done" > without printing it? (gdb) help set variable Evaluate expression EXP and assign result to variable

Re: gdbstub initial code, v9

2010-09-09 Thread Oleg Nesterov
On 09/09, Jan Kratochvil wrote: > > On Thu, 09 Sep 2010 17:50:47 +0200, Oleg Nesterov wrote: > > Probably I need to implement G/P first, otherwise gdb can't change ip. > > > > Still, I'd appreciate if someone can explain me what gdb needs/expects > > to handle breakpoints before I start to read the

Re: gdbstub initial code, v9

2010-09-09 Thread Jan Kratochvil
On Thu, 09 Sep 2010 17:50:47 +0200, Oleg Nesterov wrote: > Probably I need to implement G/P first, otherwise gdb can't change ip. > > Still, I'd appreciate if someone can explain me what gdb needs/expects > to handle breakpoints before I start to read the sources. Yes, GDB tries to set PC to PC-1

Re: gdbstub initial code, v9

2010-09-09 Thread Frank Ch. Eigler
Hi - On Thu, Sep 09, 2010 at 05:50:47PM +0200, Oleg Nesterov wrote: > Probably I need to implement G/P first, otherwise gdb can't change ip. Perhaps. > Still, I'd appreciate if someone can explain me what gdb needs/expects > to handle breakpoints before I start to read the sources. It'd be sim

Re: gdbstub initial code, v9

2010-09-09 Thread Oleg Nesterov
On 09/09, Oleg Nesterov wrote: > > the tracee hits this bp and reports SIGTRAP > > => vStopped > <= OK > => g > <= 00064000401f207d007f00... > => P10=ba054000 > <= > => G00064000401f207

Re: gdbstub initial code, v9

2010-09-09 Thread Oleg Nesterov
On 09/09, Frank Ch. Eigler wrote: > > Oleg Nesterov writes: > > > [...] > > But, Jan. Implementing the memory writes does not mean breakpoints > > automatically start to work! > > It approximately should though. > > > Yes, gdb writes cc, and yes the tracee reports SIGTRAP. But after > > that "cont

Re: gdbstub initial code, v9

2010-09-09 Thread Oleg Nesterov
On 09/09, Jan Kratochvil wrote: > > Hi Oleg, > > kernel-devel-2.6.34.6-54.fc13.x86_64 (real F13) says: > > ugdb.c:1988: error: implicit declaration of function ‘hex_to_bin’ OOPS. It was added by 903788892ea0fc7fcaf7e8e5fac9a77379fc215b Please see the attachment with the copy-and-pastes hex_to_bin

Re: gdbstub initial code, v9

2010-09-09 Thread Frank Ch. Eigler
Oleg Nesterov writes: > [...] > But, Jan. Implementing the memory writes does not mean breakpoints > automatically start to work! It approximately should though. > Yes, gdb writes cc, and yes the tracee reports SIGTRAP. But after > that "continue" does nothing except "$c", and the tracee natura

Re: gdbstub initial code, v9

2010-09-09 Thread Jan Kratochvil
Hi Oleg, kernel-devel-2.6.34.6-54.fc13.x86_64 (real F13) says: ugdb.c:1988: error: implicit declaration of function ‘hex_to_bin’ Jan