Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Small fix for i386-linux-nat.c
@ 2000-08-28 14:59 Mark Kettenis
  0 siblings, 0 replies; only message in thread
From: Mark Kettenis @ 2000-08-28 14:59 UTC (permalink / raw)
  To: gdb-patches

FYI, I committed the attached patch.  Should fix some problems with
debugging multi-threaded programs on SSE-aware systems.

Mark


2000-08-27  Mark Kettenis  <kettenis@gnu.org>

	* i386-linux-nat.c (fetch_inferior_registers): Move call to
	dummy_sse_values ...
	(supply_fpregset): ... here.


Index: i386-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-nat.c,v
retrieving revision 1.15
diff -u -p -r1.15 i386-linux-nat.c
--- i386-linux-nat.c	2000/08/11 19:45:21	1.15
+++ i386-linux-nat.c	2000/08/28 21:38:45
@@ -41,6 +41,9 @@
 /* Prototypes for i387_supply_fsave etc.  */
 #include "i387-nat.h"
 
+/* Prototypes for local functions.  */
+static void dummy_sse_values (void);
+
 /* On Linux, threads are implemented as pseudo-processes, in which
    case we may be tracing more than one process at a time.  In that
    case, inferior_pid will contain the main process ID and the
@@ -358,6 +361,7 @@ void 
 supply_fpregset (elf_fpregset_t *fpregsetp)
 {
   i387_supply_fsave ((char *) fpregsetp);
+  dummy_sse_values ();
 }
 
 /* Fill register REGNO (if it is a floating-point register) in
@@ -574,7 +578,6 @@ fetch_inferior_registers (int regno)
 	 gdbarch.  Until then, this will at least make things work
 	 plausibly.  */
       fetch_fpregs (tid);
-      dummy_sse_values ();
       return;
     }
 
From dje@watson.ibm.com Mon Aug 28 17:34:00 2000
From: David Edelsohn <dje@watson.ibm.com>
To: Nick Duffek <nsd@redhat.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: [PATCH] rs6000-nat.c ldinfo size fix
Date: Mon, 28 Aug 2000 17:34:00 -0000
Message-id: <200008290034.UAA30184@mal-ach.watson.ibm.com>
X-SW-Source: 2000-08/msg00335.html
Content-length: 879

	It looks like the size of the allocated ldinfo buffer is being
multiplied by load_segs twice although the ptrace() size argument is
correct.

David

Index: rs6000-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-nat.c,v
retrieving revision 1.9
diff -c -p -r1.9 rs6000-nat.c
*** rs6000-nat.c	2000/08/27 22:30:29	1.9
--- rs6000-nat.c	2000/08/29 00:19:52
*************** xcoff_relocate_symtab (unsigned int pid)
*** 931,937 ****
    do
      {
        size = load_segs * ldisize;
!       ldi = (void *) xrealloc (ldi, load_segs * size);
  
  #if 0
        /* According to my humble theory, AIX has some timing problems and
--- 931,937 ----
    do
      {
        size = load_segs * ldisize;
!       ldi = (void *) xrealloc (ldi, size);
  
  #if 0
        /* According to my humble theory, AIX has some timing problems and
From kevinb@cygnus.com Mon Aug 28 18:58:00 2000
From: Kevin Buettner <kevinb@cygnus.com>
To: Kevin Buettner <kevinb@cygnus.com>, gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH RFC] Protoize gdbserver/utils.c
Date: Mon, 28 Aug 2000 18:58:00 -0000
Message-id: <1000829015835.ZM17227@ocotillo.lan>
References: <1000826174731.ZM8289@ocotillo.lan> <kevinb@cygnus.com>
X-SW-Source: 2000-08/msg00336.html
Content-length: 166

On Aug 26, 10:47am, Kevin Buettner wrote:

> 	* gdbserver/utils.c (error, fatal): Protoize.

Committed.

Thanks (again) to Michael Chastain for reviewing this patch.
From kevinb@cygnus.com Mon Aug 28 19:30:00 2000
From: Kevin Buettner <kevinb@cygnus.com>
To: gdb-patches@sourceware.cygnus.com
Subject: [PATCH RFC] Protoize gnu-nat.c, hp-psymtab-read.c
Date: Mon, 28 Aug 2000 19:30:00 -0000
Message-id: <1000829023006.ZM17300@ocotillo.lan>
X-SW-Source: 2000-08/msg00337.html
Content-length: 4186

More protoization...

All three of the functions under consideration contained comments in
the parameter declarations.  For gnu_xfer_memory() and scan_procs(), I
moved the parameter comments into the prefatory comment.  The comments
for the arguments of hp_quick_traverse() didn't say anything that
couldn't be discerned from the parameter names, so I removed them.

	* gnu-nat.c (gnu_xfer_memory): Protoize.
	* hp-psymtab-read.c (scan_procs, hp_quick_traverse): Protoize.

Index: gnu-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-nat.c,v
retrieving revision 1.6
diff -u -r1.6 gnu-nat.c
--- gnu-nat.c	2000/07/30 01:48:25	1.6
+++ gnu-nat.c	2000/08/29 02:08:40
@@ -2442,14 +2442,11 @@
 }
 
 \f
-/* Return 0 on failure, number of bytes handled otherwise.  */
+/* Return 0 on failure, number of bytes handled otherwise.  TARGET
+   is ignored. */
 static int
-gnu_xfer_memory (memaddr, myaddr, len, write, target)
-     CORE_ADDR memaddr;
-     char *myaddr;
-     int len;
-     int write;
-     struct target_ops *target;	/* IGNORED */
+gnu_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+		 struct target_ops *target)
 {
   task_t task = (current_inferior
 		 ? (current_inferior->task
Index: hp-psymtab-read.c
===================================================================
RCS file: /cvs/src/src/gdb/hp-psymtab-read.c,v
retrieving revision 1.5
diff -u -r1.5 hp-psymtab-read.c
--- hp-psymtab-read.c	2000/07/30 01:48:25	1.5
+++ hp-psymtab-read.c	2000/08/29 02:08:42
@@ -488,20 +488,23 @@
    pointed to by CURR_PD_P, and between code addresses START_ADR and END_ADR.
    Other parameters are explained in comments below. */
 
-/* This used to be inline in hpread_quick_traverse, but now that we do essentially the
-   same thing for two different cases (modules and module-less files), it's better
-   organized in a separate routine, although it does take lots of arguments. pai/1997-10-08 */
+/* This used to be inline in hpread_quick_traverse, but now that we do
+   essentially the same thing for two different cases (modules and
+   module-less files), it's better organized in a separate routine,
+   although it does take lots of arguments.  pai/1997-10-08
+   
+   CURR_PD_P is the pointer to the current proc index. QPD is the
+   procedure quick lookup table.  MAX_PROCS is the number of entries
+   in the proc. table.  START_ADR is the beginning of the code range
+   for the current psymtab.  end_adr is the end of the code range for
+   the current psymtab.  PST is the current psymtab.  VT_bits is
+   a pointer to the strings table of SOM debug space.  OBJFILE is
+   the current object file. */
 
 static int
-scan_procs (curr_pd_p, qPD, max_procs, start_adr, end_adr, pst, vt_bits, objfile)
-     int *curr_pd_p;		/* pointer to current proc index */
-     quick_procedure_entry *qPD;	/* the procedure quick lookup table */
-     int max_procs;		/* number of entries in proc. table */
-     CORE_ADDR start_adr;	/* beginning of code range for current psymtab */
-     CORE_ADDR end_adr;		/* end of code range for current psymtab */
-     struct partial_symtab *pst;	/* current psymtab */
-     char *vt_bits;		/* strings table of SOM debug space */
-     struct objfile *objfile;	/* current object file */
+scan_procs (int *curr_pd_p, quick_procedure_entry *qPD, int max_procs,
+	    CORE_ADDR start_adr, CORE_ADDR end_adr, struct partial_symtab *pst,
+	    char *vt_bits, struct objfile *objfile)
 {
   union dnttentry *dn_bufp;
   int symbol_count = 0;		/* Total number of symbols in this psymtab */
@@ -623,11 +626,8 @@
    entry for it, so in such cases we create a psymtab for the file.  */
 
 int
-hpread_quick_traverse (objfile, gntt_bits, vt_bits, pxdb_header_p)
-     struct objfile *objfile;	/* The object file descriptor */
-     char *gntt_bits;		/* GNTT entries, loaded in from the file */
-     char *vt_bits;		/* VT (string) entries ditto. */
-     PXDB_header_ptr pxdb_header_p;	/* Pointer to pxdb header ditto */
+hpread_quick_traverse (struct objfile *objfile, char *gntt_bits,
+		       char *vt_bits, PXDB_header_ptr pxdb_header_p)
 {
   struct partial_symtab *pst;
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-08-28 14:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-28 14:59 [PATCH] Small fix for i386-linux-nat.c Mark Kettenis

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