Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [RFC v2 2/9] move some rsp bits into rsp-low.h
Date: Thu, 13 Feb 2014 09:02:00 -0000	[thread overview]
Message-ID: <52FC89A6.8010806@codesourcery.com> (raw)
In-Reply-To: <1391714966-12125-3-git-send-email-tromey@redhat.com>

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


  reply	other threads:[~2014-02-13  9:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-06 19:29 [RFC v2 0/9] move more code into common/ Tom Tromey
2014-02-06 19:29 ` [RFC v2 1/9] share "cell" code Tom Tromey
2014-02-06 19:29 ` [RFC v2 3/9] don't let bin2hex call strlen Tom Tromey
2014-02-06 19:29 ` [RFC v2 2/9] move some rsp bits into rsp-low.h Tom Tromey
2014-02-13  9:02   ` Yao Qi [this message]
2014-02-13 10:38     ` Pedro Alves
2014-02-14  2:00       ` Yao Qi
2014-02-13 15:08     ` Tom Tromey
2014-02-14  1:36       ` Yao Qi
2014-02-06 19:29 ` [RFC v2 4/9] don't let hexify call strlen Tom Tromey
2014-02-06 19:38 ` [RFC v2 5/9] replace hexify with bin2hex Tom Tromey
2014-02-06 19:41 ` [RFC v2 6/9] replace convert_int_to_ascii " Tom Tromey
2014-02-06 20:23 ` [RFC v2 7/9] replace unhexify with hex2bin Tom Tromey
2014-02-06 20:23 ` [RFC v2 8/9] replace convert_ascii_to_int " Tom Tromey
2014-02-06 20:24 ` [RFC v2 9/9] update rsp-low comments Tom Tromey
2014-02-07 12:53 ` [RFC v2 0/9] move more code into common/ Pedro Alves
2014-02-12 16:57 ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52FC89A6.8010806@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox