[commit] Pass current_target, not exec_ops, to SOLIB_ADD

Andrew Cagney ac131313@redhat.com
Tue Nov 25 16:08:00 GMT 2003


Found while examining the PPC64.  After a while the code corrupts the 
target stack.  Wouldn't have affected other targets as they aren't so 
reliant on the target's section_table.

The comment:

+         /* NOTE: cagney/2003-11-25: Make certain that the target
+             stack's section table is kept up-to-date.  Architectures,
+             (e.g., PPC64), use the section table to perform
+             operations such as address => section name and hence
+             require the table to contain all sections (including
+             those found in shared libraries).  */
+         /* NOTE: cagney/2003-11-25: Pass current_target and not
+             exec_ops to SOLIB_ADD.  This is because current GDB is
+             only tooled to propagate section_table changes out from
+             the "current_target" (see target_resize_to_sections), and
+             not up from the exec stratum.  This, of course, isn't
+             right.  "infrun.c" should only interact with the
+             exec/process stratum, instead relying on the target stack
+             to propagate relevant changes (stop, section table
+             changed, ...) up to other layers.  */

and an examination of target_resize_to_sections should explain the problem.

committed,
Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20031125/ace56361/attachment.ksh>


More information about the Gdb-patches mailing list