summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2005-10-06 00:22:57 +0000
committerAlan Modra <amodra@bigpond.net.au>2005-10-06 00:22:57 +0000
commitf960ec1b60cbc76e20316fcc4b123e62bf5d32ff (patch)
tree1447994b4408d1b78ec0a551ec0a416974cc2ad7
parent4bc69d36e6010d38485d5659e28c8447f66f9901 (diff)
downloadgdb-f960ec1b60cbc76e20316fcc4b123e62bf5d32ff.tar.gz
PR 1659
* rs6000-tdep.c (rs6000_push_dummy_call): Correct size of backchain write. (rs6000_convert_from_func_ptr_addr): Correct comment.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/rs6000-tdep.c8
2 files changed, 11 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6a9e515c81c..2cfa2b59540 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-06 Alan Modra <amodra@bigpond.net.au>
+
+ PR 1659
+ * rs6000-tdep.c (rs6000_push_dummy_call): Correct size of
+ backchain write.
+ (rs6000_convert_from_func_ptr_addr): Correct comment.
+
2005-10-03 Joel Brobecker <brobecker@adacore.com>
* MAINTAINERS: Add section for release management.
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index d3024253221..4d2a94480c8 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1629,8 +1629,8 @@ ran_out_of_registers_for_arguments:
regcache_raw_write_signed (regcache, SP_REGNUM, sp);
/* Set back chain properly. */
- store_unsigned_integer (tmp_buffer, 4, saved_sp);
- write_memory (sp, tmp_buffer, 4);
+ store_unsigned_integer (tmp_buffer, wordsize, saved_sp);
+ write_memory (sp, tmp_buffer, wordsize);
/* Point the inferior function call's return address at the dummy's
breakpoint. */
@@ -2241,13 +2241,13 @@ rs6000_create_inferior (int pid)
Usually a function pointer's representation is simply the address
of the function. On the RS/6000 however, a function pointer is
- represented by a pointer to a TOC entry. This TOC entry contains
+ represented by a pointer to an OPD entry. This OPD entry contains
three words, the first word is the address of the function, the
second word is the TOC pointer (r2), and the third word is the
static chain value. Throughout GDB it is currently assumed that a
function pointer contains the address of the function, which is not
easy to fix. In addition, the conversion of a function address to
- a function pointer would require allocation of a TOC entry in the
+ a function pointer would require allocation of an OPD entry in the
inferior's memory space, with all its drawbacks. To be able to
call C++ virtual methods in the inferior (which are called via
function pointers), find_function_addr uses this function to get the