This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fwd: gcore for netbsd]


Andrew Cagney wrote:

Hello,

This patch has made me wonder why gcore even includes <sys/procfs.h>.

I'm guessing it went in before I split some code out into linux-proc.c.



Can anyone think of a reason for not simply removing the include?
	
Try it and see...
Going going ....

I'm also wondering what the function preempt_derive_stack_segment() is
for.  I can't find any callers.

Probably for future use -- for systems where the default method didn't work, or where there was a more efficient method available.
It can't be a global though. That is going to be very multi-arch / multi-target unfriendly.

Mind if that gets removed as well? As it is, it is wrong.

Andrew


  ------------------------------------------------------------------------

Subject: gcore for netbsd
Date: 16 Jul 2002 03:35:47 +0200
From: Love <lha@stacken.kth.se>
To: gdb@sources.redhat.com

Hi

I've added gcore support for netbsd, the core writing support need some
more work (like adding more stuff to the elf notes in the netbsd core file)

One simple thing you can do for me is to protect the <sys/procfs.h> in
gcore.c like its done in other files so its possible to include gcore.c on
platforms that doesn't have <sys/procfs.h>.

Love

Index: gcore.c
===================================================================
RCS file: /cvs/src/src/gdb/gcore.c,v
retrieving revision 1.5
diff -u -u -w -r1.5 gcore.c
--- gcore.c     12 Apr 2002 23:09:48 -0000      1.5
+++ gcore.c     16 Jul 2002 01:30:03 -0000
@@ -23,7 +23,9 @@
 #include "inferior.h"
 #include "gdbcore.h"
 #include "elf-bfd.h"
+#ifdef HAVE_SYS_PROCFS_H
 #include <sys/procfs.h>
+#endif
 #include "symfile.h"
 #include "objfiles.h"




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]