* [RFA] Crossdebugging compilation fix for x86-64
@ 2002-03-04 4:30 Michal Ludvig
2002-03-04 8:20 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Michal Ludvig @ 2002-03-04 4:30 UTC (permalink / raw)
To: gdb-patches
Index: ChangeLog
from Michal Ludvig <mludvig@suse.cz>
* MAINTAINERS (x86-64): Target is not broken anymore.
* x86-64-tdep.h (sys/reg.h): Delete
(R15, R14, R13, R12, RBP, RBX, R11, R10, R9, R8, RAX, RCX, RDX,
RSI, RDI, ORIG, RIP, CS, EFLAGS, RSP, SS): Define. These can't be
included from sys/reg.h when compiling for cross-debuging.
Index: x86-64-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.h,v
retrieving revision 1.1
diff -c -3 -p -r1.1 x86-64-tdep.h
*** x86-64-tdep.h 2001/09/21 12:19:15 1.1
--- x86-64-tdep.h 2002/03/04 12:26:44
***************
*** 24,30 ****
#define X86_64_TDEP_H
#include "i386-tdep.h"
! #include <sys/reg.h>
/* Mapping between the general-purpose registers in `struct user'
format and GDB's register array layout. */
--- 24,55 ----
#define X86_64_TDEP_H
#include "i386-tdep.h"
!
! /* Because of cross-debugging we can't include glibc's sys/reg.h */
!
! /* Index into an array of 8 byte longs returned from ptrace for
! location of the users' stored general purpose registers. */
!
! #define R14 1
! #define R13 2
! #define R12 3
! #define RBP 4
! #define RBX 5
! #define R11 6
! #define R10 7
! #define R9 8
! #define R8 9
! #define RAX 10
! #define RCX 11
! #define RDX 12
! #define RSI 13
! #define RDI 14
! #define ORIG_RAX 15
! #define RIP 16
! #define CS 17
! #define EFLAGS 18
! #define RSP 19
! #define SS 20
/* Mapping between the general-purpose registers in `struct user'
format and GDB's register array layout. */
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* +420 2 9654 5373 * http://www.suse.cz
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [RFA] Crossdebugging compilation fix for x86-64
2002-03-04 4:30 [RFA] Crossdebugging compilation fix for x86-64 Michal Ludvig
@ 2002-03-04 8:20 ` Daniel Jacobowitz
2002-03-04 10:03 ` Andreas Schwab
2002-03-04 12:24 ` Andreas Jaeger
0 siblings, 2 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-03-04 8:20 UTC (permalink / raw)
To: Michal Ludvig; +Cc: gdb-patches
On Mon, Mar 04, 2002 at 01:29:58PM +0100, Michal Ludvig wrote:
> Index: ChangeLog
> from Michal Ludvig <mludvig@suse.cz>
>
> * MAINTAINERS (x86-64): Target is not broken anymore.
> * x86-64-tdep.h (sys/reg.h): Delete
> (R15, R14, R13, R12, RBP, RBX, R11, R10, R9, R8, RAX, RCX, RDX,
> RSI, RDI, ORIG, RIP, CS, EFLAGS, RSP, SS): Define. These can't be
> included from sys/reg.h when compiling for cross-debuging.
These belong in a Linux-specific file. Their order is not dependent on
anything in the x86-64 ABI, is it?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] Crossdebugging compilation fix for x86-64
2002-03-04 8:20 ` Daniel Jacobowitz
@ 2002-03-04 10:03 ` Andreas Schwab
2002-03-04 10:08 ` Michal Ludvig
2002-03-04 12:24 ` Andreas Jaeger
1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2002-03-04 10:03 UTC (permalink / raw)
To: Michal Ludvig; +Cc: gdb-patches
Daniel Jacobowitz <drow@mvista.com> writes:
|> On Mon, Mar 04, 2002 at 01:29:58PM +0100, Michal Ludvig wrote:
|> > Index: ChangeLog
|> > from Michal Ludvig <mludvig@suse.cz>
|> >
|> > * MAINTAINERS (x86-64): Target is not broken anymore.
|> > * x86-64-tdep.h (sys/reg.h): Delete
|> > (R15, R14, R13, R12, RBP, RBX, R11, R10, R9, R8, RAX, RCX, RDX,
|> > RSI, RDI, ORIG, RIP, CS, EFLAGS, RSP, SS): Define. These can't be
|> > included from sys/reg.h when compiling for cross-debuging.
|>
|> These belong in a Linux-specific file. Their order is not dependent on
|> anything in the x86-64 ABI, is it?
What puzzles me more is the fact that x86_64_regmap is defined (and not
just declared) in a header. It is only used in x86-64-linux-nat.c, so it
should be moved there (and that file can use <sys/reg.h> freely).
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] Crossdebugging compilation fix for x86-64
2002-03-04 10:03 ` Andreas Schwab
@ 2002-03-04 10:08 ` Michal Ludvig
0 siblings, 0 replies; 5+ messages in thread
From: Michal Ludvig @ 2002-03-04 10:08 UTC (permalink / raw)
To: gdb-patches
Andreas Schwab wrote:
> What puzzles me more is the fact that x86_64_regmap is defined (and not
> just declared) in a header. It is only used in x86-64-linux-nat.c, so it
> should be moved there (and that file can use <sys/reg.h> freely).
I already did this change in my tree and will post a patch for approval
tomorrow.
And what about these declarations:
gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;
Shouldn't they go away from the header as well, so that only #defines
will remain there as on other architectures?
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* +420 2 9654 5373 * http://www.suse.cz
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA] Crossdebugging compilation fix for x86-64
2002-03-04 8:20 ` Daniel Jacobowitz
2002-03-04 10:03 ` Andreas Schwab
@ 2002-03-04 12:24 ` Andreas Jaeger
1 sibling, 0 replies; 5+ messages in thread
From: Andreas Jaeger @ 2002-03-04 12:24 UTC (permalink / raw)
To: Michal Ludvig; +Cc: gdb-patches
Daniel Jacobowitz <drow@mvista.com> writes:
> On Mon, Mar 04, 2002 at 01:29:58PM +0100, Michal Ludvig wrote:
>> Index: ChangeLog
>> from Michal Ludvig <mludvig@suse.cz>
>>
>> * MAINTAINERS (x86-64): Target is not broken anymore.
>> * x86-64-tdep.h (sys/reg.h): Delete
>> (R15, R14, R13, R12, RBP, RBX, R11, R10, R9, R8, RAX, RCX, RDX,
>> RSI, RDI, ORIG, RIP, CS, EFLAGS, RSP, SS): Define. These can't be
>> included from sys/reg.h when compiling for cross-debuging.
>
> These belong in a Linux-specific file. Their order is not dependent on
> anything in the x86-64 ABI, is it?
Correct, the x86-64 ABI does not define those,
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-03-04 20:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-04 4:30 [RFA] Crossdebugging compilation fix for x86-64 Michal Ludvig
2002-03-04 8:20 ` Daniel Jacobowitz
2002-03-04 10:03 ` Andreas Schwab
2002-03-04 10:08 ` Michal Ludvig
2002-03-04 12:24 ` Andreas Jaeger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox