From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14285 invoked by alias); 13 Feb 2014 09:02:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 14274 invoked by uid 89); 13 Feb 2014 09:02:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.6 required=5.0 tests=AWL,BAYES_00,GARBLED_BODY autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Feb 2014 09:02:22 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WDsBW-0004TZ-6e from Yao_Qi@mentor.com ; Thu, 13 Feb 2014 01:02:18 -0800 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 13 Feb 2014 01:02:18 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Thu, 13 Feb 2014 01:02:17 -0800 Message-ID: <52FC89A6.8010806@codesourcery.com> Date: Thu, 13 Feb 2014 09:02:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Tom Tromey CC: Subject: Re: [RFC v2 2/9] move some rsp bits into rsp-low.h References: <1391714966-12125-1-git-send-email-tromey@redhat.com> <1391714966-12125-3-git-send-email-tromey@redhat.com> In-Reply-To: <1391714966-12125-3-git-send-email-tromey@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00450.txt.bz2 On 02/07/2014 03:29 AM, Tom Tromey wrote: > 2014-02-06 Tom Tromey > > * 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 * 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