This is the mail archive of the gdb-patches@sources.redhat.com 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]

[commit] Fix two xfer partial bugs; Was; RFA: ia64 portion of libunwindpatch


Jeff,

I've just committed the attached. It fixes two bugs when using xfer partial in an existing target.

- the "add_target" method was always overriding the child's to_xfer_partial method. The consequence is that the code your patch adds is never called!

- the code would all off the end of a stack which this part of the change fixed: * target.c (init_dummy_target): Initialize to_xfer_partial to default.

I've one more tweak to the target code. Once thats in can you please confirm that this new child method is called and is needed - seems things work without it?

Andrew
2003-11-06  Andrew Cagney  <cagney@redhat.com>
	    Jeff Johnston  <jjohnstn@redhat.com>

	* target.c (add_target): Only set "to_xfer_partial" when NULL.
	(init_dummy_target): Set "to_xfer_partial".

Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/target.c,v
retrieving revision 1.64
diff -u -r1.64 target.c
--- target.c	31 Oct 2003 15:25:34 -0000	1.64
+++ target.c	6 Nov 2003 19:55:45 -0000
@@ -220,7 +220,8 @@
 add_target (struct target_ops *t)
 {
   /* Provide default values for all "must have" methods.  */
-  t->to_xfer_partial = default_xfer_partial;
+  if (t->to_xfer_partial == NULL)
+    t->to_xfer_partial = default_xfer_partial;
 
   if (!target_structs)
     {
@@ -1644,6 +1645,7 @@
   dummy_target.to_stratum = dummy_stratum;
   dummy_target.to_find_memory_regions = dummy_find_memory_regions;
   dummy_target.to_make_corefile_notes = dummy_make_corefile_notes;
+  dummy_target.to_xfer_partial = default_xfer_partial;
   dummy_target.to_magic = OPS_MAGIC;
 }
 

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