reformatting user command argument
Daniel Jacobowitz
drow@false.org
Thu May 11 14:47:00 GMT 2006
On Thu, May 11, 2006 at 01:41:56PM +0100, Tavis Ormandy wrote:
> Hello, I've written a macro to assemble instructions directly to memory
> using the nasm assembler to make patching binaries using `set write`
> easier, it works great, but as a final touch I'd like to be able to tell
> the assembler the address where the code will be inserted.
>
> This works fine if I call my macro as `assemble 0x12345`, or `assemble
> $pc` but if I use `assemble _start` i cant convert that to an address. I
> thought `set $arg0 = (unsigned) $arg0` might work, but no such luck.
You can't do this interchangeably with numbers, but &_start should give
you something of the appropriate type.
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb
mailing list