emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r107595: GDB change for dynamically g


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107595: GDB change for dynamically generated code (tiny change)
Date: Tue, 13 Mar 2012 00:07:10 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107595
fixes bug(s): http://debbugs.gnu.org/10597
author: Kaushik Srenevasan <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2012-03-13 00:07:10 -0700
message:
  GDB change for dynamically generated code (tiny change)
  Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-01/msg00753.html
  
  * lisp/progmodes/gdb-mi.el (gdb-invalidate-disassembly):
  For dynamically generated code, follow $PC.
  (gdb-disassembly-handler-custom): Handle no function name case.
modified:
  lisp/ChangeLog
  lisp/progmodes/gdb-mi.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-03-13 06:54:37 +0000
+++ b/lisp/ChangeLog    2012-03-13 07:07:10 +0000
@@ -1,3 +1,9 @@
+2012-03-13  Kaushik Srenevasan  <address@hidden>  (tiny change)
+
+       * progmodes/gdb-mi.el (gdb-invalidate-disassembly):
+       For dynamically generated code, follow $PC.
+       (gdb-disassembly-handler-custom): Handle no function name case.
+
 2012-03-13  Tim Landscheidt  <address@hidden>  (tiny change)
 
        * calendar/icalendar.el (icalendar-export-file, icalendar-import-file):

=== modified file 'lisp/progmodes/gdb-mi.el'
--- a/lisp/progmodes/gdb-mi.el  2012-03-06 08:37:38 +0000
+++ b/lisp/progmodes/gdb-mi.el  2012-03-13 07:07:10 +0000
@@ -3269,8 +3269,12 @@
   (let* ((frame (gdb-current-buffer-frame))
          (file (bindat-get-field frame 'fullname))
          (line (bindat-get-field frame 'line)))
-    (when file
-      (format "-data-disassemble -f %s -l %s -n -1 -- 0" file line)))
+    (if file
+      (format "-data-disassemble -f %s -l %s -n -1 -- 0" file line)
+    ;; If we're unable to get a file name / line for $PC, simply
+    ;; follow $PC, disassembling the next 10 (x ~15 (on IA) ==
+    ;; 150 bytes) instructions.
+    "-data-disassemble -s $pc -e \"$pc + 150\" -- 0"))
   gdb-disassembly-handler
   ;; We update disassembly only after we have actual frame information
   ;; about all threads, so no there's `update' signal in this list
@@ -3329,8 +3333,12 @@
       (gdb-table-add-row table
                          (list
                           (bindat-get-field instr 'address)
-                          (apply #'format "<%s+%s>:"
-                                 (gdb-get-many-fields instr 'func-name 
'offset))
+                          (let
+                              ((func-name (bindat-get-field instr 'func-name))
+                               (offset (bindat-get-field instr 'offset)))
+                            (if func-name
+                                (format "<%s+%s>:" func-name offset)
+                              ""))
                           (bindat-get-field instr 'inst)))
       (when (string-equal (bindat-get-field instr 'address)
                           address)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]