|
From: Jeremy F. <je...@go...> - 2004-07-02 16:06:47
|
On Fri, 2004-07-02 at 13:55 +0100, Nicholas Nethercote wrote: > A better way of identifying instructions is with a (obj_file, obj_offset) > pair. That will AFAICT uniquely identify any static instruction. Yeah, that's not a bad idea. There's a few complications though. Do you actually mean byte offset into the object file? That's a bit coarse, since you'd then have to work hard to map that back into a segment and get symtab information. It also makes it hard to work out the mapped address if you just have a file offset+baseaddr. If you recorded (file, segment, offset), you could address these. And obviously you also need the virtual address of the instruction for the common case of the .so has not been unloaded. If you store file as (path, base_address), you know where the object was mapped, and you can work everything out from that. J |