From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8736 invoked by alias); 14 Nov 2011 16:10:43 -0000 Received: (qmail 8622 invoked by uid 22791); 14 Nov 2011 16:10:37 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Nov 2011 16:10:20 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pAEG9rbR007706 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 14 Nov 2011 11:09:53 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pAEG9q5F018289; Mon, 14 Nov 2011 11:09:52 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id pAEG9mFX015905; Mon, 14 Nov 2011 11:09:49 -0500 From: Tom Tromey To: "Ulrich Weigand" Cc: pedro@codesourcery.com (Pedro Alves), gdb-patches@sourceware.org, brobecker@adacore.com (Joel Brobecker) Subject: FYI: tracepoints and multi-arch (Was: RFC: remove gdbarch from struct breakpoint) References: <201111081718.pA8HInH6022772@d06av02.portsmouth.uk.ibm.com> Date: Mon, 14 Nov 2011 16:10:00 -0000 In-Reply-To: (Tom Tromey's message of "Tue, 08 Nov 2011 11:09:42 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 X-SW-Source: 2011-11/txt/msg00355.txt.bz2 Tom> If I do drop it, I will still pull in the tracepoint changes, since I Tom> think those are probably good. I am checking this in, as discussed. This patch fixes a few spots where tracepoints rely on the breakpoint's arch; in general I think the location's arch is more appropriate. Tom 2011-11-14 Tom Tromey * tracepoint.c (encode_actions_1): Use the location's gdbarch. (encode_actions): Likewise. Index: tracepoint.c =================================================================== RCS file: /cvs/src/src/gdb/tracepoint.c,v retrieving revision 1.236 diff -u -r1.236 tracepoint.c --- tracepoint.c 14 Nov 2011 15:18:54 -0000 1.236 +++ tracepoint.c 14 Nov 2011 16:07:57 -0000 @@ -1370,14 +1370,14 @@ if (0 == strncasecmp ("$reg", action_exp, 4)) { - for (i = 0; i < gdbarch_num_regs (t->gdbarch); i++) + for (i = 0; i < gdbarch_num_regs (tloc->gdbarch); i++) add_register (collect, i); action_exp = strchr (action_exp, ','); /* more? */ } else if (0 == strncasecmp ("$arg", action_exp, 4)) { add_local_symbols (collect, - t->gdbarch, + tloc->gdbarch, tloc->address, frame_reg, frame_offset, @@ -1387,7 +1387,7 @@ else if (0 == strncasecmp ("$loc", action_exp, 4)) { add_local_symbols (collect, - t->gdbarch, + tloc->gdbarch, tloc->address, frame_reg, frame_offset, @@ -1399,7 +1399,7 @@ struct cleanup *old_chain1 = NULL; aexpr = gen_trace_for_return_address (tloc->address, - t->gdbarch); + tloc->gdbarch); old_chain1 = make_cleanup_free_agent_expr (aexpr); @@ -1452,7 +1452,7 @@ { const char *name = &exp->elts[2].string; - i = user_reg_map_name_to_regnum (t->gdbarch, + i = user_reg_map_name_to_regnum (tloc->gdbarch, name, strlen (name)); if (i == -1) internal_error (__FILE__, __LINE__, @@ -1475,7 +1475,7 @@ case OP_VAR_VALUE: collect_symbol (collect, exp->elts[2].symbol, - t->gdbarch, + tloc->gdbarch, frame_reg, frame_offset, tloc->address); @@ -1588,8 +1588,8 @@ *tdp_actions = NULL; *stepping_actions = NULL; - gdbarch_virtual_frame_pointer (t->gdbarch, - t->loc->address, &frame_reg, &frame_offset); + gdbarch_virtual_frame_pointer (tloc->gdbarch, + tloc->address, &frame_reg, &frame_offset); actions = breakpoint_commands (t);