Article View: gnu.gdb.bug
Article #1283gdb/hpux-threads on HPPA
From: H.Merijn Brand
Date: Wed, 15 Jun 2005 16:07
Date: Wed, 15 Jun 2005 16:07
94 lines
5471 bytes
5471 bytes
I finally took the time to make gdb-6.3 compile on HP-UX 11.00
This is probably not the way *you* might prefer the patch to be applied, but
without it, it won't compile
=======================================================================
HP-UX 11.00 with gcc-4.0.0/32
--8<---
--- gdb/hpux-thread.c.org 2005-06-15 16:49:37 +0200
+++ gdb/hpux-thread.c 2005-06-15 16:56:30 +0200
@@ -47,6 +47,16 @@
#include "gdb_stat.h"
#include "gdbcore.h"
+#include "hppa-tdep.h"
+#undef NUM_REGS /* gcc cannot cope with a function call here */
+extern void *memset (void *, int, size_t);
+#ifdef GDB_TARGET_IS_HPPA_20W /* hppa64 */
+#define NUM_REGS 96
+#else /* hppa32 */
+#define NUM_REGS 128
+#endif
+#define FLAGS_REGNUM HPPA_FLAGS_REGNUM
+
extern int child_suppress_run;
extern void _initialize_hpux_thread (void);
@@ -286,7 +296,7 @@ hpux_thread_fetch_registers (int regno)
deprecated_child_ops.to_fetch_registers (regno);
else
{
- unsigned char buf[MAX_REGISTER_SIZE];
+ char buf[MAX_REGISTER_SIZE];
CORE_ADDR sp;
sp = (CORE_ADDR) tcb_ptr->static_ctx.sp - 160;
-->8---
One warning left:
gcc -B/usr/local/pa20_32/bin -c -mpa-risc-2-0 -g -O2 -Dvfork=fork -I. -I. -I./config -DLOCALEDIR="\"/usr/local/pa20_32/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../intl -I./../intl -DMI_OUT=1 -DTUI=1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral -Wunused-label -Wunused-function -I./osf-share \
-I./osf-share/HP800 -I/usr/include/dce \
./hpux-thread.c
./hpux-thread.c: In function 'hpux_thread_store_registers':
./hpux-thread.c:375: warning: cast to pointer from integer of different size
=======================================================================
HP-UX 11.00 with gcc-4.0.0/64
I happen to have a ncurses 64bit lib that gdb finds, but does not like:
gcc64 -B/usr/local/pa20_64/bin -mpa-risc-2-0 -g -O2 -Dvfork=fork \
-o gdb gdb.o libgdb.a \
../bfd/libbfd.a ../readline/libreadline.a ../opcodes/libopcodes.a ../libiberty/libiberty.a -lncurses -lm ../libiberty/libiberty.a
libgdb.a(hppa-hpux-tdep.o): In function `hppa_hpux_som_find_global_pointer':
: undefined reference to `som_solib_get_got_by_pc'
libgdb.a(tui-io.o): In function `tui_puts':
: undefined reference to `__getcury'
libgdb.a(tui-winsource.o): In function `tui_show_source_line':
: undefined reference to `__getcury'
collect2: ld returned 1 exit status
When run by hand with -lcurses, I get
a5:/pro/3gl/GNU/gdb-6.3/gdb 160 > gcc64 -B/usr/local/pa20_64/bin -mpa-risc-2-0 -g -O2 -Dvfork=fork -o gdb gdb.o libgdb.a ../bfd/libbfd.a ../readline/libreadline.a ../opcodes/libopcodes.a ../libiberty/libiberty.a -lcurses -lm ../libiberty/libiberty.a
libgdb.a(hppa-hpux-tdep.o): In function `hppa_hpux_som_find_global_pointer':
: undefined reference to `som_solib_get_got_by_pc'
collect2: ld returned 1 exit status
I had to add
--8<---
CORE_ADDR
som_solib_get_got_by_pc (CORE_ADDR addr)
{
return (pa64_solib_get_got_by_pc (addr));
}
-->8---
to pa64solib.c
a5:/pro/3gl/GNU/gdb-6.3/gdb 190 > gcc64 -B/usr/local/pa20_64/bin -mpa-risc-2-0 -g -O2 -Dvfork=fork -o gdb gdb.o libgdb.a ../bfd/libbfd.a ../readline/libreadline.a ../opcodes/libopcodes.a ../libiberty/libiberty.a -lcurses -lm ../libiberty/libiberty.a
a5:/pro/3gl/GNU/gdb-6.3/gdb 191 >
:) :)
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using Perl 5.6.2, 5.8.0, 5.8.5, & 5.9.2 on HP-UX 10.20, 11.00 & 11.11,
AIX 4.3 & 5.2, SuSE 9.2 & 9.3, and Cygwin. http://www.cmve.net/~merijn
Smoking perl: http://www.test-smoke.org, perl QA: http://qa.perl.org
reports to: smokers-reports@perl.org, perl-qa@perl.org
Technical Details
Message-ID:
<mailman.478.1119199356.2857.bug-gdb@gnu.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f5053,8817eea7ecd5b473,start X-Google-Attributes: gidf5053,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail From: "H.Merijn Brand" <h.m.brand@xs4all.nl> Newsgroups: gnu.gdb.bug Subject: gdb/hpux-threads on HPPA Date: Wed, 15 Jun 2005 18:07:03 +0200 Lines: 96 Approved: bug-gdb@gnu.org Message-ID: <mailman.478.1119199356.2857.bug-gdb@gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: news.Stanford.EDU 1119199328 28950 199.232.76.165 (19 Jun 2005 16:42:09 GMT) X-Complaints-To: news@news.stanford.edu To: bug-gdb@gnu.org Envelope-to: bug-gdb@gnu.org X-Mailer: Sylpheed-Claws 1.9.11 (GTK+ 2.4.9; i686-pc-linux-gnu) X-Virus-Scanned: by XS4ALL Virus Scanner X-Mailman-Approved-At: Sun, 19 Jun 2005 12:42:33 -0400 X-BeenThere: bug-gdb@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org> List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/pipermail/bug-gdb> List-Post: <mailto:bug-gdb@gnu.org> List-Help: <mailto:bug-gdb-request@gnu.org?subject=help> List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=subscribe>