Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa/5?] fix refsheet when PS and A4 and separate build dir
@ 2000-05-23  6:35 Andrew Cagney
  2000-05-23 13:41 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 2000-05-23  6:35 UTC (permalink / raw)
  To: GDB Patches

FYI,

The attached fixes the fairly obscure case of generating a reference
card for an A4 PS printer when building from a separate directory. 
``for f in "a.sed b.sed" ; do'' doesn't work very well.

Ok?

	Andrew
Tue May 23 22:57:41 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* Makefile.in (refcard.dvi): Remove quotes around REFEDITS in for
 	loop.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/doc/Makefile.in,v
retrieving revision 1.4.2.3
diff -p -r1.4.2.3 Makefile.in
*** Makefile.in	2000/05/17 11:54:04	1.4.2.3
--- Makefile.in	2000/05/23 13:30:07
*************** refcard.dvi : refcard.tex $(REFEDITS)
*** 189,195 ****
  		cp $(srcdir)/refcard.tex sedref.tex ; \
  	else \
  		echo > tmp.sed ; \
! 		for f in "$(REFEDITS)" ; do \
  			cat $(srcdir)/$$f >>tmp.sed ; done ; \
  		sed -f tmp.sed $(srcdir)/refcard.tex >sedref.tex ; \
  	fi
--- 189,195 ----
  		cp $(srcdir)/refcard.tex sedref.tex ; \
  	else \
  		echo > tmp.sed ; \
! 		for f in $(REFEDITS) ; do \
  			cat $(srcdir)/$$f >>tmp.sed ; done ; \
  		sed -f tmp.sed $(srcdir)/refcard.tex >sedref.tex ; \
  	fi
From aj@suse.de Tue May 23 07:34:00 2000
From: Andreas Jaeger <aj@suse.de>
To: gdb-patches@sourceware.cygnus.com
Subject: Prototypes for lin-thread.c
Date: Tue, 23 May 2000 07:34:00 -0000
Message-id: <u81z2txrye.fsf@gromit.rhein-neckar.de>
X-SW-Source: 2000-05/msg00348.html
Content-length: 1518

lin-thread is missing a number of prototypes for external
declarations.  I'm appending a patch to add these to lin-thread.c.  

A better place would be to add this to a header file since at least
some functions are declared in processor specific files,
e.g. fill_gregset is implemented for Linux in m68klinux-nat.c,
i386-linux-nat.c and ppc-linux-nat.c.  What do you think?  Where
should such a header be added?

Btw. adding these gives new warnings which should be dealt with in a
separate patch.

Andreas

2000-05-23  Andreas Jaeger  <aj@suse.de>

	* lin-thread.c: Add prototypes for external functions.

Index: gdb/lin-thread.c
===================================================================
RCS file: /cvs/src/src/gdb/lin-thread.c,v
retrieving revision 1.4
diff -u -r1.4 lin-thread.c
--- lin-thread.c	2000/04/14 10:13:50	1.4
+++ lin-thread.c	2000/05/23 14:21:57
@@ -125,6 +125,17 @@
 
 #include <dlfcn.h>		/* dynamic library interface */
 
+extern void fill_gregset (elf_gregset_t *, int);
+extern void supply_gregset (elf_gregset_t *);
+extern void linuxthreads_discard_global_state (void);
+extern void attach_thread (int);
+extern void check_all_signal_numbers (void);
+extern int linux_child_wait (int, int *, int *);
+extern void fill_fpregset (elf_fpregset_t *, int);
+extern void supply_fpregset (elf_fpregset_t *);
+
+
+
 #ifndef TIDGET
 #define TIDGET(PID)		(((PID) & 0x7fffffff) >> 16)
 #define PIDGET(PID)		(((PID) & 0xffff))

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
From msnyder@cygnus.com Tue May 23 07:41:00 2000
From: Michael Snyder <msnyder@cygnus.com>
To: Mark Kettenis <kettenis@wins.uva.nl>
Cc: kevinb@cygnus.com, aoliva@cygnus.com, gdb-patches@sourceware.cygnus.com, taylor@cygnus.com
Subject: Re: GDB 5.0 won't build on GNU/Linux/sparc
Date: Tue, 23 May 2000 07:41:00 -0000
Message-id: <392A97D3.465A@cygnus.com>
References: <oraehlelgf.fsf@tamanduatei.dcc.unicamp.br> <1000523021152.ZM4540@ocotillo.lan> <3929EBCF.2178@cygnus.com> <200005230847.e4N8lql09626@delius.kettenis.local>
X-SW-Source: 2000-05/msg00349.html
Content-length: 1056

Mark Kettenis wrote:
> 
>    Date: Mon, 22 May 2000 19:24:15 -0700
>    From: Michael Snyder <msnyder@cygnus.com>
> 
>    Well... you're right that their being in sparc-tdep.c is questionable,
>    but I'm not sure they fit any better in sparc-nat.c, unles that file
>    is renamed to sparc-solaris-nat.c.  These functions are specific to
>    /proc, which is (one reason) why they would not build on Linux.
> 
> Well, /proc may indeed be their origin, but some ELF systems that
> don't have the SVR4 /proc provide some of the infrastructure that
> makes supply_gregset() and fill_gregset() usefull too.  Take for
> example Linux/i386 and my upcoming FreeBSD/i386.  Now if the gregset_t
> and fpregset_t on Linux/Sparc don't differ too much from Solaris, it
> may be beneficial too let them share the code.

Interesting!

I noticed that supply_gregset makes some unspoken assumptions 
about the internal layout of a gregset_t.  I was thinking of
cleaning that up, but if it was only for Solaris (where the
assumptions are true) it didn't seem worthwhile.
From ac131313@cygnus.com Tue May 23 07:46:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: Add missing make_cleanup_close ().
Date: Tue, 23 May 2000 07:46:00 -0000
Message-id: <392A99AB.3E74198B@cygnus.com>
X-SW-Source: 2000-05/msg00350.html
Content-length: 1507

FYI,

The attached slipped through (thanks Mark K for noticing it).

	Andrew
Wed May 24 00:38:09 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* utils.c (make_cleanup_close, do_close_cleanup): New functions.
	* defs.h (make_cleanup_close): Add declaration.

Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.20
diff -p -r1.20 defs.h
*** defs.h	2000/05/22 02:07:18	1.20
--- defs.h	2000/05/23 14:41:10
*************** extern struct cleanup *make_cleanup_free
*** 332,337 ****
--- 332,339 ----
  struct ui_file;
  extern struct cleanup *make_cleanup_ui_file_delete (struct ui_file *);
  
+ extern struct cleanup *make_cleanup_close (int fd);
+ 
  extern struct cleanup *make_cleanup_bfd_close (bfd *abfd);
  
  extern struct cleanup *make_final_cleanup (make_cleanup_ftype *, void *);
Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.12
diff -p -r1.12 utils.c
*** utils.c	2000/05/22 02:07:19	1.12
--- utils.c	2000/05/23 14:41:14
*************** make_cleanup_bfd_close (bfd *abfd)
*** 216,221 ****
--- 216,234 ----
  }
  
  static void
+ do_close_cleanup (void *arg)
+ {
+   close ((int) arg);
+ }
+ 
+ struct cleanup *
+ make_cleanup_close (int fd)
+ {
+   /* int into void*. Outch!! */
+   return make_cleanup (do_close_cleanup, (void *) fd);
+ }
+ 
+ static void
  do_ui_file_delete (void *arg)
  {
    ui_file_delete (arg);
From kettenis@wins.uva.nl Tue May 23 07:53:00 2000
From: Mark Kettenis <kettenis@wins.uva.nl>
To: aj@suse.de
Cc: gdb-patches@sourceware.cygnus.com, msnyder@cygnus.com
Subject: Re: Prototypes for lin-thread.c
Date: Tue, 23 May 2000 07:53:00 -0000
Message-id: <200005231453.QAA11103@landau.wins.uva.nl>
References: <u81z2txrye.fsf@gromit.rhein-neckar.de>
X-SW-Source: 2000-05/msg00351.html
Content-length: 386

   From: Andreas Jaeger <aj@suse.de>
   Date: 23 May 2000 16:27:05 +0200

[Michael, looks like the patch mentioned below has fallen through the
 cracks]

Andreas, if you're messing with lin-thread.c, please take a look at:

  http://sourceware.cygnus.com/ml/gdb-patches/2000-04/msg00455.html

This patch makes some vast improvements, and in itself should get rid
of all warnings.

Mark
From taylor@cygnus.com Tue May 23 08:43:00 2000
From: David Taylor <taylor@cygnus.com>
To: Gregory Lielens <Gregory.Lielens@fft.be>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: Correction of complex number display for fortran program
Date: Tue, 23 May 2000 08:43:00 -0000
Message-id: <200005231542.LAA23604@texas.cygnus.com>
X-SW-Source: 2000-05/msg00352.html
Content-length: 1640

    Date: Tue, 23 May 2000 13:41:55 +0200
    From: Gregory Lielens <Gregory.Lielens@fft.be>

    Hi,
    I 've just dowloaded GDB 5.0 and use it to debug a fortran subroutine.
    I've noted that value of complex variables or arrays are incorrectly
    outputed by the print command, and also within the DDD frontend.
    When inspecting a complex variable V, the value printed is
    (Real(V),Real(V)) instead of (Real(V),Imag(V)). This behavior was
    already present in the previous version of gdb, but this time I think
    I've corrected it and send you the (very) small patch - one line to
    change!

    I'll try to follow the guidelines for this, but it's the first time I
    contribute and English is not my native language, so don't expect too
    much...

You did great.  Thanks.

    Here is the Changelog

    Tue May 23 13:20:00 1999  Gregory Lielens  <info@fft.be>

	    * f-valprint.c : Corrected f_val_print function for TYPE_CODE
    (type) = TYPE_CODE_COMPLEX


    and the diff

     diff -up f-valprint.c.old f-valprint.c
    --- f-valprint.c.old    Tue May 23 13:34:51 2000
    +++ f-valprint.c        Tue May 23 13:34:25 2000
    @@ -564,7 +564,7 @@ f_val_print (type, valaddr, embedded_off
	   fputs_filtered ("(", stream);
	   print_floating (valaddr, type, stream);
	   fputs_filtered (",", stream);
    -      print_floating (valaddr, type, stream);
    +      print_floating (valaddr+TYPE_LENGTH(type), type, stream);
	   fputs_filtered (")", stream);
	   break;


    Hope this help, and congratulation for the 5.0 release: it seems at lot
    more stable when interacting whith DDD

Approved.

    Greg.


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

end of thread, other threads:[~2000-05-23 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-23  6:35 [rfa/5?] fix refsheet when PS and A4 and separate build dir Andrew Cagney
2000-05-23 13:41 ` Eli Zaretskii

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