Update of /cvsroot/fink/dists/10.4/stable/main/finkinfo/devel
In directory vz-cvs-3.sog:/tmp/cvs-serv5645
Modified Files:
gdb-7.4.info
Added Files:
gdb.patch
Log Message:
update that enables/fixes i386 from tracker:
http://sourceforge.net/tracker/index.php?func=detail&aid=3514143&group_id=17203&atid=414256
--- NEW FILE: gdb.patch ---
===================================================================
RCS file: /cvs/src/src/gdb/darwin-nat.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- src/gdb/darwin-nat.c 2012/03/14 01:46:59 1.31
+++ src/gdb/darwin-nat.c 2012/04/02 11:57:30 1.32
@@ -39,6 +39,7 @@
#include "value.h"
#include "arch-utils.h"
#include "bfd.h"
+#include "bfd/mach-o.h"
#include <sys/ptrace.h>
#include <sys/signal.h>
@@ -1538,6 +1539,22 @@
return;
}
+ /* Specify the same binary preference to spawn the shell as the
+ exec binary. This avoids spawning a 64bit shell while debugging
+ a 32bit program, which may confuse gdb.
+ Also, this slightly breaks internal layers as we suppose the binary
+ is Mach-O. Doesn't harm in practice. */
+ if (exec_bfd != NULL)
+ {
+ cpu_type_t pref;
+ size_t ocount;
+
+ pref = bfd_mach_o_get_data (exec_bfd)->header.cputype;
+ res = posix_spawnattr_setbinpref_np (&attr, 1, &pref, &ocount);
+ if (res != 0 || ocount != 1)
+ fprintf_unfiltered (gdb_stderr, "Cannot set posix_spawn binpref\n");
+ }
+
posix_spawnp (NULL, argv[0], NULL, &attr, argv, env);
}
Index: gdb-7.4.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/stable/main/finkinfo/devel/gdb-7.4.info,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gdb-7.4.info 26 Mar 2012 17:39:20 -0000 1.2
+++ gdb-7.4.info 2 Apr 2012 22:44:57 -0000 1.3
@@ -1,17 +1,19 @@
Package: gdb
Version: 7.4
-Revision: 1
+Revision: 2
Maintainer: Jack Howarth <[email protected]>
License: GPL3
Source: http://ftp.gnu.org/gnu/gdb/gdb-%v.tar.bz2
Source-MD5: 95a9a8305fed4d30a30a6dc28ff9d060
+PatchFile: %n.patch
+PatchFile-MD5: fce75d59977b07c8fbe39220ca6ccfa7
SourceDirectory: gdb-%v
Depends: python27, expat1-shlibs, libncurses5-shlibs, libiconv,
libgettext8-shlibs, python27-shlibs
BuildDepends: expat1, gettext-tools, libgettext8-dev, python27, libncurses5,
libiconv-dev, fink (>= 0.24.12)
SetLDFLAGS: -L%p/lib/python2.7/config
ConfigureParams: --program-prefix=fsf- --with-expat --with-python
--disable-gdbtk --enable-tui --disable-werror python_prog_path=%p/bin/python2.7
SetCFLAGS: -O2 -g -Wno-unused-value
-Architecture: x86_64
+Architecture: x86_64, i386
DocFiles: COPYING COPYING3 README
InfoDocs: gdb.info gdbint.info
Homepage: http://www.gnu.org/software/gdb/
@@ -25,6 +27,16 @@
The programs in this package are prefixed with fsf- (gdb is "fsf-gdb",
etc.) to avoid conflicting with Xcode's programs of the same name.
<<
+CompileScript: <<
+ #!/bin/sh -ev
+ if [ "%m" = "i386" ]
+ then
+ ./configure %c --enable-64-bit-bfd
+ else
+ ./configure %c
+ fi
+ make
+<<
InstallScript:<<
#!/bin/bash -ev
make install DESTDIR=%d
@@ -43,19 +55,7 @@
chmod g+s %p/bin/fsf-%ntui
<<
DescPort: <<
-Why no i386 Architecture?
-Unfortunately i386 fink builds a broken fsf-gdb...
-
-gdb) break main
-Breakpoint 1 at 0x1e60: file himenoBMTxpa.c, line 78.
-(gdb) r
-Starting program: /Users/howarth/a.out
-darwin_set_sstep: unknown flavour: 4
-Error calling thread_get_state for GP registers for thread 0x8451lxwarning:
Mach error at "i386-darwin-nat.c:118" in function
"i386_darwin_fetch_inferior_registers": (os/kern) invalid argument (0x4)
-(gdb) quit
-A debugging session is active.
-
-Inferior 1 [process 34004] will be killed.
-
-However both i386 and x86_64 debugging works fine on x86_64 fink so I have
limited gdb-7.4-1 to that architecture for now. Will bring the i386 kernel
breakage to the attention of upstream.
+Add
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/darwin-nat.c.diff?cvsroot=src&r1=1.31&r2=1.32
+as backport from gdb trunk to fix i386 build. Also added the required
--enable-64-bit-bfd to
+configure for the i386 build so it can also work with x86_64 binaries.
<<
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs