From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Blandy To: Andrew Cagney Cc: Jim Blandy , Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] gdb extension for Harvard architectures Date: Wed, 03 Oct 2001 12:41:00 -0000 Message-id: References: <3BB4D843.A92818B9@cygnus.com> <3BB512A9.6050801@cygnus.com> <3BB5195F.6050603@cygnus.com> <3BBA2DC9.5060500@cygnus.com> X-SW-Source: 2001-10/msg00059.html [Sorry, replying to several messages and repeating myself a bit.] Andrew Cagney writes: > Any way, consider the intent of someone entering a sequence like: > > (gdb) x/w foo > 0x0 > (gdb) x/i foo > nop > (gdb) print/x *(int*)foo > 0xdeadbeef > > vs > (gdb) print/x *(int*)foo > 0x0 > > and where should this go: > > (gdb) set *(int*)foo = 0xdeadbeef > > This mysterious address switching strikes me as wierd. This is an existing problem. Any C compiler for a machine with distinct code and data address spaces will do the same thing. The value of the proposal Michael and I have put together is not that it solves all possible problems, or that it makes counterintuitive architectures somehow behave like more familiar architectures. The value is that it allows a user to accomplish what they want at all. I think our proposal: - adapts to other sorts of spaces well, - has a consistent type story, and - doesn't change the meaning of any valid C expressions.