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]

FYI: tracepoints and multi-arch (Was: RFC: remove gdbarch from struct breakpoint)


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  <tromey@redhat.com>

	* 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);
 


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