[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compiling gdb on HP-UX
From: |
Jay |
Subject: |
compiling gdb on HP-UX |
Date: |
Tue, 17 Feb 2009 15:59:33 +0000 |
gdb 6.8 release
bash-3.2$ uname -a
HP-UX jkhpux1 B.11.11 U 9000/800 1595760578 unlimited-user license
bash-3.2$ gcc -v (still working on getting 4.3.3 to build)
Reading specs from /usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.3.6/specs
Configured with: /src/gcc-3.3.6/configure -verbose -with-as=/usr/local/bin/gas -
with-gnu-as
Thread model: single
gcc version 3.3.6
bash-3.2$
gmake[2]: Entering directory `/home/jay/src/gdb-6.8/gdb'
gcc -c -g -O2 -I. -I.././gdb -I.././gdb/config -DLOCALEDIR="\"/usr/local/share
/locale\"" -DHAVE_CONFIG_H -I.././gdb/../include/opcode -I.././gdb/../readline/.
. -I../bfd -I.././gdb/../bfd -I.././gdb/../include -I../libdecnumber -I.././gdb/
../libdecnumber -I./../intl -DMI_OUT=1 -DTUI=1 -Wall -Wpointer-arith -Wformat-
nonliteral -Wno-unused -Wno-switch -Wno-char-subscripts -Werror solib-pa64.c
solib-pa64.c: In function `read_dld_descriptor':
solib-pa64.c:170: warning: passing arg 4 of `dlgetmodinfo' from incompatible poi
nter type
solib-pa64.c: In function `pa64_current_sos':
solib-pa64.c:472: warning: passing arg 4 of `dlgetmodinfo' from incompatible poi
nter type
solib-pa64.c:479: warning: passing arg 3 of `dlgetname' from incompatible pointe
r type
solib-pa64.c: In function `pa64_open_symbol_file_object':
solib-pa64.c:539: warning: passing arg 4 of `dlgetmodinfo' from incompatible poi
nter type
solib-pa64.c:545: warning: passing arg 3 of `dlgetname' from incompatible pointe
r type
gmake[2]: *** [solib-pa64.o] Error 1
gmake[2]: Leaving directory `/home/jay/src/gdb-6.8/gdb'
gmake[1]: *** [all-gdb] Error 2
gmake[1]: Leaving directory `/home/jay/src/gdb-6.8'
gmake: *** [all] Error 2
$
gdb/solib-pa64.c:
static void *
pa64_target_read_memory (void *buffer, CORE_ADDR ptr, size_t bufsiz, int ident)
{
if (target_read_memory (ptr, buffer, bufsiz) != 0)
return 0;
return buffer;
/usr/include/dlfcn.h:
extern UINT64 dlgetmodinfo(int index,
struct load_module_desc* desc,
size_t desc_size,
void* (*read_tgt_mem)(void* buffer,
UINT64 ptr,
size_t bufsiz,
int ident),
int ident_parm,
UINT64 load_map_parm);
I changed CORE_ADDR to UINT64 and can now proceed.
Removing -Werror probably would have worked too.
ser-tcp.c: In function `net_open':
ser-tcp.c:207: warning: passing arg 5 of `getsockopt' from incompatible pointer
type
gmake: *** [ser-tcp.o] Error 1
bash-3.2$
res = getsockopt (scb->fd, SOL_SOCKET, SO_ERROR, (void *) &err, &len);
Putting #define _XOPEN_SOURCE_EXTENDED at the top of ser-tcp.c fixed this.
/usr/include/sys/socket.h reads like:
typedef size_t socklen_t;
#ifdef _XOPEN_SOURCE_EXTENDED
int getsockopt(int, int, int, void*, socklen_t*);
#else
int getsockopt(int, int, int, void*, int*);
#endif
../gdb/tui/tui-io.c: In function `tui_getc':
../gdb/tui/tui-io.c:681: warning: implicit declaration of function `napms'
gmake: *** [tui-io.o] Error 1
bash-3.2$ grep napms /usr/include/*
/usr/include/curses.h:extern int napms __((int));
bash-3.2$
That is under #ifdef _XOPEN_SOURCE_EXTENDED
so I added #define _XOPEN_SOURCE_EXTENDED to the top of tui-io.c and that fixed
it.
../gdb/tui/tui-regs.c: In function `tui_display_register':
../gdb/tui/tui-regs.c:553: warning: implicit declaration of function `waddstr'
ditto -- #define _XOPEN_SOURCE_EXTENDED in tui-regs.c
../gdb/tui/tui-stack.c: In function `tui_show_locator_content':
../gdb/tui/tui-stack.c:257: warning: implicit declaration of function `waddstr'
ditto -- #define _XOPEN_SOURCE_EXTENDED in tui-stack.c
Yes, I realize it could be added to CC or config.h or whatever.
../gdb/tui/tui-windata.c: In function `tui_erase_data_content':
../gdb/tui/tui-windata.c:119: warning: implicit declaration of function
`mvwaddstr'
ditto -- #define _XOPEN_SOURCE_EXTENDED in tui-windata.c
../gdb/tui/tui-wingeneral.c: In function `box_win':
../gdb/tui/tui-wingeneral.c:97: warning: implicit declaration of function
`wborder'
../gdb/tui/tui-wingeneral.c:105: warning: implicit declaration of function
`mvwaddstr'
gmake: *** [tui-wingeneral.o] Error 1
ditto -- #define _XOPEN_SOURCE_EXTENDED in tui-wingeneral.c
../gdb/tui/tui-winsource.c: In function `tui_erase_source_content':
../gdb/tui/tui-winsource.c:245: warning: implicit declaration of function
`mvwaddstr'
gmake: *** [tui-winsource.o] Error 1
ditto -- #define _XOPEN_SOURCE_EXTENDED in tui-winsource.c
And then it seems to work.
- Jay
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- compiling gdb on HP-UX,
Jay <=