[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian conference in the US?



Hi Greg,

Now that you've got this release out, have you given any thought to the
message I sent earlier about merging gdb server versions?

Here it is again in case you've forgotten:


Hi,

The current version of gdbserver in uClinux-dist only works on the m68k.
In my v850-specific version of uClinux-dist, I include a version of
gdbserver that works on the v850, which I created based on gdb-5.3.  I
think it should generally be much more portable than the old version, as
it's far less hacked up (the only changes I made to put it into the
uClinux-dist/user tree are to move the files around to fit the old
scheme better; I have a shell script that does that automatically).

I haven't yet sent my patches to gdb-central because I'm waiting to get
a copyright disclaimer, but perhaps you might want to include this newer
version in uClinux-dist?

I suppose it will work on other platforms too; the issues that I know
about are:

 (1) In linux-low.c, I do this to get the various address offsets
     (similar to the code in the old m68k gdbserver, which uses
     hard-wired constants):

        text = ptrace (PTRACE_PEEKUSER, pid, (long)PT_TEXT_ADDR, 0);
        text_len = ptrace (PTRACE_PEEKUSER, pid, (long)PT_TEXT_LEN, 0);
        real_data = ptrace (PTRACE_PEEKUSER, pid, (long)PT_DATA_ADDR, 0);

     I defined PT_TEXT_ADDR, PT_TEXT_LEN, and PT_DATA_ADDR in
     include/asm-v850/ptrace.h in the kernel:

        /* These are `magic' values for PTRACE_PEEKUSR that return info
           about where a process is located in memory.  */
        #define PT_TEXT_ADDR	(PT_SIZE + 1)
        #define PT_TEXT_LEN	(PT_SIZE + 2)
        #define PT_DATA_ADDR	(PT_SIZE + 3)

     Could you add similar to defines to the other uClinux ports, so
     that the linux-low.c code will work on them too?  BTW, notice that
     I used `PT_TEXT_LEN' instead of `PT_TEXT_END_ADDR' (which is
     what the m68k uses), as addr-len pairs generally seem cleaner to
     me than addr-endaddr pairs (makes the code slightly simpler too).

 (2) Since stuff in uClinux-dist comes `pre-configured' (i.e. doesn't
     get to run the configure script), and I of course configured it for
     the v850, the gdbserver Makefile needs to somehow select the proper
     machine-dependent files to use.  Currently the only
     machine-dependent bits seem to be these:

        DEPFILES = reg-v850e.o linux-low.o linux-v850e-low.o 

     Perhaps it would be good enough to change this to something like:

        DEPFILES = reg-$(CPU).o linux-low.o linux-$(CPU)-low.o 

     But I'm not sure where I can get CPU from; is there something
     handy in the uClinux-dist Makefiles that could be used?  The set
     of CPU values used in (my version of) gdbserver are:

        v850e, s390, arm, x86-64, i386, mips, ppc, sh, ia64, m68k

     So it seems that the most `obvious' value should work OK Hmmm,
     perhaps I ought to change `v850e' to be `v850' for compatibility
     with the kernel, etc... sigh.

What are your thoughts?

Thanks,

-Miles

-- 
`To alcohol!  The cause of, and solution to,
 all of life's problems' --Homer J. Simpson



Reply to: