From: Daniel Jacobowitz <drow@false.org>
To: Tavis Ormandy <taviso@sdf.lonestar.org>
Cc: gdb@sourceware.org
Subject: Re: reformatting user command argument
Date: Thu, 11 May 2006 14:47:00 -0000 [thread overview]
Message-ID: <20060511124959.GA3567@nevyn.them.org> (raw)
In-Reply-To: <20060511124156.GB23650@sdf.lonestar.org>
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
prev parent reply other threads:[~2006-05-11 12:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-11 14:14 Tavis Ormandy
2006-05-11 14:47 ` Daniel Jacobowitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060511124959.GA3567@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=taviso@sdf.lonestar.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox