This is the mail archive of the gdb-patches@sourceware.org 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: [RFC v2 2/9] move some rsp bits into rsp-low.h


On 02/07/2014 03:29 AM, Tom Tromey wrote:
> 2014-02-06  Tom Tromey  <tromey@redhat.com>
> 
> 	* tracepoint.c: Include rsp-low.h.
> 	* server.c: Include rsp-low.h.
> 	* remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
> 	(unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
> 	declare.
> 	* remote-utils.c: Include rsp-low.h.
> 	(fromhex, hexchars, ishex, unhexify, tohex, hexify)
> 	(remote_escape_output, remote_unescape_input, unpack_varlen_hex)
> 	(convert_int_to_ascii, convert_ascii_to_int): Move to
> 	common/rsp-low.c.
> 	* regcache.c: Include rsp-low.h.
> 	* ax.c: Include rsp-low.h.
> 	* Makefile.in (SFILES): Add common/rsp-low.c.
> 	(OBS): Add rsp-low.o.
> 	(rsp-low.o): New target.

We also need to compile rsp-low.c for IPA, and link rsp-low-ipa.o
in IPA.  I get the ipa build error below,

gcc -shared -fPIC -Wl,--no-undefined -g -O2    -I. -I../../../../git/gdb/gdbserver -I../../../../git/gdb/gdbserver/../common -I../../../../git/gdb/gdbserver/../regformats -I../../../../git/gdb/gdbserver/.. -I../../../../git/gdb/gdbserver/../../include -I../../../../git/gdb/gdbserver/../gnulib/import -Ibuild-gnulib-gdbserver/import -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Wempty-body -Werror -DGDBSERVER \
 -Wl,--dynamic-list=../../../../git/gdb/gdbserver/proc-service.list -o libinproctrace.so ax-ipa.o tracepoint-ipa.o format-ipa.o utils-ipa.o regcache-ipa.o remote-utils-ipa.o common-utils-ipa.o tdesc-ipa.o print-utils-ipa.o i386-linux-ipa.o linux-i386-ipa.o -ldl -pthread
tracepoint-ipa.o: In function `cstr_to_hexstr':
/home/yao/Source/gnu/gdb/build-git/x86/gdb/gdbserver/../../../../git/gdb/gdbserver/tracepoint.c:6933: undefined reference to `bin2hex'
tracepoint-ipa.o: In function `cmd_qtstmat':
/home/yao/Source/gnu/gdb/build-git/x86/gdb/gdbserver/../../../../git/gdb/gdbserver/tracepoint.c:7080: undefined reference to `unpack_varlen_hex'
tracepoint-ipa.o: In function `probe_marker_at':
/home/yao/Source/gnu/gdb/build-git/x86/gdb/gdbserver/../../../../git/gdb/gdbserver/tracepoint.c:7034: undefined reference to `unpack_varlen_hex'
tracepoint-ipa.o: In function `unprobe_marker_at':
/home/yao/Source/gnu/gdb/build-git/x86/gdb/gdbserver/../../../../git/gdb/gdbserver/tracepoint.c:7003: undefined reference to `unpack_varlen_hex'

The fix is to compile rsp-low and link it with ipa, as below.
The compile error is fixed.

-- 
Yao (éå)

Subject: [PATCH] Compile rsp-low.c for IPA

gdb/gdbserver:

2014-02-13  Yao Qi  <yao@codesourcery.com>

	* Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
	(rsp-low-ipa.o): New target.
---
 gdb/gdbserver/Makefile.in |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 5f69ddb..663deb6b 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -292,7 +292,7 @@ gdbreplay$(EXEEXT): $(GDBREPLAY_OBS) $(LIBGNU)
 	${CC-LD} $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) \
 	  $(XM_CLIBS) $(LIBGNU)
 
-IPA_OBJS=ax-ipa.o tracepoint-ipa.o format-ipa.o utils-ipa.o regcache-ipa.o remote-utils-ipa.o common-utils-ipa.o tdesc-ipa.o print-utils-ipa.o ${IPA_DEPFILES}
+IPA_OBJS=ax-ipa.o tracepoint-ipa.o format-ipa.o utils-ipa.o regcache-ipa.o remote-utils-ipa.o common-utils-ipa.o tdesc-ipa.o print-utils-ipa.o rsp-low-ipa.o ${IPA_DEPFILES}
 
 IPA_LIB=libinproctrace.so
 
@@ -475,6 +475,9 @@ tdesc-ipa.o: tdesc.c
 print-utils-ipa.o: ../common/print-utils.c
 	$(IPAGENT_COMPILE) $<
 	$(POSTCOMPILE)
+rsp-low-ipa.o: ../common/rsp-low.c
+	$(IPAGENT_COMPILE) $<
+	$(POSTCOMPILE)
 
 ax.o: ax.c
 	$(COMPILE) $(WARN_CFLAGS_NO_FORMAT) $<
-- 
1.7.7.6


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