This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: D10V_MAKE_IADDR / D10V_MAKE_DADDR / GDB_TARGET_IS_D10V



> One thing that you may want to keep in mind is that it may not just
> be text vs. data.  I once wrote a C compiler for a machine that 4
> different pointer formats (pointers to 16-bit words, pointers to
> bytes, and 2 different bit pointers).  The original machine in the
> family did not have byte addressing at all, and so when they hacked
> in byte addressability, the byte pointer was the word pointer
> shifted left one bit (losing the top bit, which was an indirection
> bit, and not used for the address itself).

But in all these cases, you must be able to determine the pointer
format from the C type.  Otherwise, the * operator doesn't know what
to do when applied to some external pointer variable --- the type is
all the info it has.

So, the conversion macros get the pointer type as an argument --- not
some hacky my-problem-is-the-only-problem data/text flag.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]