Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Bad checkin breaks Linux
@ 2002-01-12 16:32 H . J . Lu
  2002-01-14  8:39 ` Elena Zannoni
  2002-01-14 11:42 ` Michael Snyder
  0 siblings, 2 replies; 4+ messages in thread
From: H . J . Lu @ 2002-01-12 16:32 UTC (permalink / raw)
  To: msnyder; +Cc: gdb-patches

This patch

http://sources.redhat.com/ml/gdb-patches/2002-01/msg00195.html

breaks Linux targets which don't use PTRACE_GETFPXREGS. The problem is
<sys/ptrace.h> has

  /* Single step the process.
     This is not supported on all machines.  */
  PTRACE_SINGLESTEP = 9,
#define PT_STEP PTRACE_SINGLESTEP

  /* Get all general purpose registers used by a processes.
     This is not supported on all machines.  */
   PTRACE_GETREGS = 12,
#define PT_GETREGS PTRACE_GETREGS

  /* Set all general purpose registers used by a processes.
     This is not supported on all machines.  */
   PTRACE_SETREGS = 13,
#define PT_SETREGS PTRACE_SETREGS

  /* Get all floating point registers used by a processes.
     This is not supported on all machines.  */
   PTRACE_GETFPREGS = 14,
#define PT_GETFPREGS PTRACE_GETFPREGS

  /* Set all floating point registers used by a processes.
     This is not supported on all machines.  */
   PTRACE_SETFPREGS = 15,
#define PT_SETFPREGS PTRACE_SETFPREGS

  /* Get all extended floating point registers used by a processes.
     This is not supported on all machines.  */
   PTRACE_GETFPXREGS = 18,
#define PT_GETFPXREGS PTRACE_GETFPXREGS

  /* Set all extended floating point registers used by a processes.
     This is not supported on all machines.  */
   PTRACE_SETFPXREGS = 19,
#define PT_SETFPXREGS PTRACE_SETFPXREGS

You can't assume you can use PTRACE_GETFPXREGS if it is defined. Due
to that change, gdb won't build on Linux/mips. I am afraid the current
gdb from CVS may be broken even without that patch:

# gcc -c -g -O2    -I. -I/home/hjl/work/gnu/src/gdb/gdb/gdb -I/home/hjl/work/gnu/src/gdb/gdb/gdb/config -DHAVE_CONFIG_H -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../include/opcode -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../readline/.. -I../bfd -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../bfd -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../include -I../intl -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../intl  -DMI_OUT=1 -DUI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized  /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c
/home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c: In function
`enable_thread_event_reporting':
/home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c:398: warning: cast from pointer to integer of different size
/home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c:411: warning: cast from pointer to integer of different size
/home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c: In function `thread_db_store_registers':
/home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c:843: warning: passing arg 2 of pointer to function from incompatible pointer type


H.J.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bad checkin breaks Linux
  2002-01-12 16:32 Bad checkin breaks Linux H . J . Lu
@ 2002-01-14  8:39 ` Elena Zannoni
  2002-01-14 11:42 ` Michael Snyder
  1 sibling, 0 replies; 4+ messages in thread
From: Elena Zannoni @ 2002-01-14  8:39 UTC (permalink / raw)
  To: H . J . Lu; +Cc: msnyder, gdb-patches

H . J . Lu writes:
 > This patch
 > 
 > http://sources.redhat.com/ml/gdb-patches/2002-01/msg00195.html
 > 
 > breaks Linux targets which don't use PTRACE_GETFPXREGS. The problem is
 > <sys/ptrace.h> has
 > 
 >   /* Single step the process.
 >      This is not supported on all machines.  */
 >   PTRACE_SINGLESTEP = 9,
 > #define PT_STEP PTRACE_SINGLESTEP
 > 
 >   /* Get all general purpose registers used by a processes.
 >      This is not supported on all machines.  */
 >    PTRACE_GETREGS = 12,
 > #define PT_GETREGS PTRACE_GETREGS
 > 
 >   /* Set all general purpose registers used by a processes.
 >      This is not supported on all machines.  */
 >    PTRACE_SETREGS = 13,
 > #define PT_SETREGS PTRACE_SETREGS
 > 
 >   /* Get all floating point registers used by a processes.
 >      This is not supported on all machines.  */
 >    PTRACE_GETFPREGS = 14,
 > #define PT_GETFPREGS PTRACE_GETFPREGS
 > 
 >   /* Set all floating point registers used by a processes.
 >      This is not supported on all machines.  */
 >    PTRACE_SETFPREGS = 15,
 > #define PT_SETFPREGS PTRACE_SETFPREGS
 > 
 >   /* Get all extended floating point registers used by a processes.
 >      This is not supported on all machines.  */
 >    PTRACE_GETFPXREGS = 18,
 > #define PT_GETFPXREGS PTRACE_GETFPXREGS
 > 
 >   /* Set all extended floating point registers used by a processes.
 >      This is not supported on all machines.  */
 >    PTRACE_SETFPXREGS = 19,
 > #define PT_SETFPXREGS PTRACE_SETFPXREGS
 > 
 > You can't assume you can use PTRACE_GETFPXREGS if it is defined. Due
 > to that change, gdb won't build on Linux/mips. I am afraid the current
 > gdb from CVS may be broken even without that patch:
 > 
 > # gcc -c -g -O2    -I. -I/home/hjl/work/gnu/src/gdb/gdb/gdb -I/home/hjl/work/gnu/src/gdb/gdb/gdb/config -DHAVE_CONFIG_H -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../include/opcode -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../readline/.. -I../bfd -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../bfd -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../include -I../intl -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../intl  -DMI_OUT=1 -DUI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized  /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c
 > /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c: In function
 > `enable_thread_event_reporting':
 > /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c:398: warning: cast from pointer to integer of different size
 > /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c:411: warning: cast from pointer to integer of different size
 > /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c: In function `thread_db_store_registers':
 > /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c:843: warning: passing arg 2 of pointer to function from incompatible pointer type
 > 

FWIW, about the last warning, see the thread:

http://sources.redhat.com/ml/gdb/2001-11/msg00203.html


Elena


 > 
 > H.J.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bad checkin breaks Linux
  2002-01-12 16:32 Bad checkin breaks Linux H . J . Lu
  2002-01-14  8:39 ` Elena Zannoni
@ 2002-01-14 11:42 ` Michael Snyder
  2002-01-14 14:47   ` Daniel Jacobowitz
  1 sibling, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2002-01-14 11:42 UTC (permalink / raw)
  To: H . J . Lu; +Cc: gdb-patches

"H . J . Lu" wrote:
> 
> This patch
> 
> http://sources.redhat.com/ml/gdb-patches/2002-01/msg00195.html
> 
> breaks Linux targets which don't use PTRACE_GETFPXREGS. The problem is
> <sys/ptrace.h> has
> 
>   /* Single step the process.
>      This is not supported on all machines.  */
>   PTRACE_SINGLESTEP = 9,
> #define PT_STEP PTRACE_SINGLESTEP
> 
>   /* Get all general purpose registers used by a processes.
>      This is not supported on all machines.  */
>    PTRACE_GETREGS = 12,
> #define PT_GETREGS PTRACE_GETREGS
> 
>   /* Set all general purpose registers used by a processes.
>      This is not supported on all machines.  */
>    PTRACE_SETREGS = 13,
> #define PT_SETREGS PTRACE_SETREGS
> 
>   /* Get all floating point registers used by a processes.
>      This is not supported on all machines.  */
>    PTRACE_GETFPREGS = 14,
> #define PT_GETFPREGS PTRACE_GETFPREGS
> 
>   /* Set all floating point registers used by a processes.
>      This is not supported on all machines.  */
>    PTRACE_SETFPREGS = 15,
> #define PT_SETFPREGS PTRACE_SETFPREGS
> 
>   /* Get all extended floating point registers used by a processes.
>      This is not supported on all machines.  */
>    PTRACE_GETFPXREGS = 18,
> #define PT_GETFPXREGS PTRACE_GETFPXREGS
> 
>   /* Set all extended floating point registers used by a processes.
>      This is not supported on all machines.  */
>    PTRACE_SETFPXREGS = 19,
> #define PT_SETFPXREGS PTRACE_SETFPXREGS
> 
> You can't assume you can use PTRACE_GETFPXREGS if it is defined. Due
> to that change, gdb won't build on Linux/mips. 

Well, that's kind of bogus!  ;-(  
Seems to me that HAVE_PTRACE_GETFPXREGS should mean that 
we have ptrace_getfpxregs.  Maybe MIPS should not define
it if it doesn't use it.

OK, I don't see how to resolve this easily -- I'll just
remove the fpxregs from the gcore file for now (so that
it will build for mips).


> I am afraid the current
> gdb from CVS may be broken even without that patch:
> 
> # gcc -c -g -O2    -I. -I/home/hjl/work/gnu/src/gdb/gdb/gdb -I/home/hjl/work/gnu/src/gdb/gdb/gdb/config -DHAVE_CONFIG_H -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../include/opcode -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../readline/.. -I../bfd -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../bfd -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../include -I../intl -I/home/hjl/work/gnu/src/gdb/gdb/gdb/../intl  -DMI_OUT=1 -DUI_OUT=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized  /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c
> /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c: In function
> `enable_thread_event_reporting':
> /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c:398: warning: cast from pointer to integer of different size
> /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c:411: warning: cast from pointer to integer of different size
> /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c: In function `thread_db_store_registers':
> /home/hjl/work/gnu/src/gdb/gdb/gdb/thread-db.c:843: warning: passing arg 2 of pointer to function from incompatible pointer type


Check the comment in gdb_proc_service.h (search for "Fix-up some broken
systems"), and see if you may need to define PRFPREGSET_T_BROKEN.

Michael


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bad checkin breaks Linux
  2002-01-14 11:42 ` Michael Snyder
@ 2002-01-14 14:47   ` Daniel Jacobowitz
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-01-14 14:47 UTC (permalink / raw)
  To: Michael Snyder; +Cc: H . J . Lu, gdb-patches

On Mon, Jan 14, 2002 at 11:36:55AM -0800, Michael Snyder wrote:
> Well, that's kind of bogus!  ;-(  
> Seems to me that HAVE_PTRACE_GETFPXREGS should mean that 
> we have ptrace_getfpxregs.  Maybe MIPS should not define
> it if it doesn't use it.
> 
> OK, I don't see how to resolve this easily -- I'll just
> remove the fpxregs from the gcore file for now (so that
> it will build for mips).

We'll need to autoconf for the appropriate types as well, I expect -
but I'm all for putting that off until we have a proper framework for
'extra' register sets.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-14 22:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-12 16:32 Bad checkin breaks Linux H . J . Lu
2002-01-14  8:39 ` Elena Zannoni
2002-01-14 11:42 ` Michael Snyder
2002-01-14 14:47   ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox