|
|
Sponsor |
Re: [PATCH] Cross target core debugging: host=i386, Target=PPC: msg#00561gdb.patches
On Jul 29, 4:59pm, Martin Gadbois wrote: > diff -Naur gdb-5.2/gdb/gregset.h gdb-5.2-ppc-core/gdb/gregset.h > --- gdb-5.2/gdb/gregset.h Sun Feb 24 17:14:33 2002 > +++ gdb-5.2-ppc-core/gdb/gregset.h Mon Jul 29 15:45:43 2002 > @@ -21,6 +21,20 @@ > #ifndef GREGSET_H > #define GREGSET_H > > + > +#define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ > +#define ELF_NFPREG 33 /* includes fpscr */ > +#define ELF_NVRREG 33 /* includes vscr */ > + > +typedef unsigned long elf_greg_t; > +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; > + > +typedef double elf_fpreg_t; > +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; > + > +#define GDB_GREGSET_T elf_gregset_t > +#define GDB_FPREGSET_T elf_fpregset_t > + > #ifndef GDB_GREGSET_T > #define GDB_GREGSET_T gregset_t > #endif This part will need some work. (The other parts might too; I haven't looked closely at them yet.) Anyway, there are several problems here... 1) The constants ELF_NGREG, ELF_NFPREG, ELF_NVRREG will almost certainly be incorrect for other targets. 2) Defining elf_greg_t in terms of a long isn't portable. 3) Likewise, for elf_fpreg_t being defined in terms of a double. For #1, why do these constants need to be put into a header file at all. Couldn't this knowledge be localized in the portion of the .c file responsible for decoding the core format? For #2 and #3, I think it's reasonably portable to define your data types in terms of arrays of characters. (Or perhaps in terms of structs containing arrays of characters. The struct representation is perhaps more convenient in certain situations.) Kevin
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: gdb-5.2-dwarfread_patch, Elena Zannoni |
|---|---|
| Next by Date: | Re: [PATCH] Cross target core debugging: host=i386, Target=PPC, Kevin Buettner |
| Previous by Thread: | [PATCH] Cross target core debugging: host=i386, Target=PPC, Martin Gadbois |
| Next by Thread: | Re: [PATCH] Cross target core debugging: host=i386, Target=PPC, Jason R Thorpe |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|