This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: How to add core addresses (or LM_ADDR problems revisited)
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: How to add core addresses (or LM_ADDR problems revisited)
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Tue, 02 Oct 2001 22:58:31 -0400
- Cc: gdb at sources dot redhat dot com
- References: <1011003013114.ZM22147@ocotillo.lan>
Kevin,
This has an interesting interaction with Michael's harvard proposal. A
CORE_ADDR, in core-gdb (er ..) could be represented as a ``struct value
*'' where TARGET_SPACE_PTR_BIT (src space, dest space) determines the
modulo / mask in any computation.
However, while their functionality might appear to overlap, I don't
think they should be tied together.
Looking at the proposal:
> CORE_ADDR
> core_addr_add (CORE_ADDR addr1, CORE_ADDR addr2)
Thinking of C, I suspect two operators are required:
CORE_ADDR core_addr_add (CORE_ADDR addr, LONGEST offset);
LONGEST core_addr_sub (CORE_ADDR a1, CORE_ADDR a2);
Don't forget that the MIPS expects sign extension so that will need to
be handled from day one. I suspect core_addr_add() and core_addr_sub()
are the things to multi-arch.
Any way, yes, I think this is long overdue!
Andrew
PS: The comment should suggest gdbarch_data() not gdbarch_swap() :-)