diff options
author | Keith Seitz <keiths@redhat.com> | 2001-08-20 17:55:32 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2001-08-20 17:55:32 +0000 |
commit | acc6219245af54484c93855d90212b8932f80b78 (patch) | |
tree | 5190e681b17dc89bee1d6245e01d292ff6520008 /gdb/gdbtk | |
parent | 314af58c0143bc4f3a47fd2c2e9535efe94b80a5 (diff) | |
download | gdb-acc6219245af54484c93855d90212b8932f80b78.tar.gz |
* generic/gdbtk-cmds.c (gdb_load_disassembly): Save the original
address from parse_and_eval_address: if find_pc_partial_function
errors, we will lose our original address.
If find_pc_partial_function does error, print out both
the address we thought we were disassembling at AND the address
we actually did disassemble at. This should help elide address-
to-pointer and pointer-to-address problems in the tdep files.
* library/srctextwin.itb (FillAssembly): When gdb_load_disassembly
fails, use its error message instead of the cooked "Unable to
Read insturctions..." message.
(UnLoadFromCache): If oldpane is empty, don't try show it,
don't try to set our view to it, don't do anything but
erase the given pane.
Diffstat (limited to 'gdb/gdbtk')
-rw-r--r-- | gdb/gdbtk/ChangeLog | 16 | ||||
-rw-r--r-- | gdb/gdbtk/generic/gdbtk-cmds.c | 6 | ||||
-rw-r--r-- | gdb/gdbtk/library/srctextwin.itb | 10 |
3 files changed, 26 insertions, 6 deletions
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog index a9312a2306c..4d1dd597eaf 100644 --- a/gdb/gdbtk/ChangeLog +++ b/gdb/gdbtk/ChangeLog @@ -1,3 +1,19 @@ +2001-08-20 Keith Seitz <keiths@redhat.com> + + * generic/gdbtk-cmds.c (gdb_load_disassembly): Save the original + address from parse_and_eval_address: if find_pc_partial_function + errors, we will lose our original address. + If find_pc_partial_function does error, print out both + the address we thought we were disassembling at AND the address + we actually did disassemble at. This should help elide address- + to-pointer and pointer-to-address problems. + * library/srctextwin.itb (FillAssembly): When gdb_load_disassembly + fails, use its error message instead of the cooked "Unable to + Read insturctions..." message. + (UnLoadFromCache): If oldpane is empty, don't try show it, + don't try to set our view to it, don't do anything but + erase the given pane. + 2001-08-17 Keith Seitz <keiths@redhat.com> * generic/gdbtk-varobj.c (variable_obj_command): Pass pointer diff --git a/gdb/gdbtk/generic/gdbtk-cmds.c b/gdb/gdbtk/generic/gdbtk-cmds.c index 7720294a090..79577a6d2f9 100644 --- a/gdb/gdbtk/generic/gdbtk-cmds.c +++ b/gdb/gdbtk/generic/gdbtk-cmds.c @@ -1636,7 +1636,7 @@ static int gdb_load_disassembly (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - CORE_ADDR low, high; + CORE_ADDR low, high, orig; struct disassembly_client_data client_data; int mixed_source_and_assembly, ret_val, i; char *arg_ptr; @@ -1729,11 +1729,13 @@ gdb_load_disassembly (ClientData clientData, Tcl_Interp *interp, /* Now parse the addresses */ low = parse_and_eval_address (Tcl_GetStringFromObj (objv[5], NULL)); + orig = low; if (objc == 6) { if (find_pc_partial_function (low, NULL, &low, &high) == 0) - error ("No function contains specified address"); + error ("No function contains address 0x%s (%s)", + paddr_nz (orig), Tcl_GetStringFromObj (objv[5], NULL)); } else high = parse_and_eval_address (Tcl_GetStringFromObj (objv[6], NULL)); diff --git a/gdb/gdbtk/library/srctextwin.itb b/gdb/gdbtk/library/srctextwin.itb index 78500329eca..a17c9027fb4 100644 --- a/gdb/gdbtk/library/srctextwin.itb +++ b/gdb/gdbtk/library/srctextwin.itb @@ -1034,7 +1034,7 @@ body SrcTextWin::FillAssembly {w tagname filename funcname line addr pc_addr lib set pane $Stwc(gdbtk_scratch_widget:pane) set win [[$itk_interior.p childsite $pane].st component text] $win delete 0.0 end - $win insert 0.0 "Unable to Read Instructions at $addr" + $win insert 0.0 "$mess" if {$oldpane != "" && $oldpane != $pane} { $itk_interior.p replace $oldpane $pane } else { @@ -2773,9 +2773,11 @@ body SrcTextWin::UnLoadFromCache {w oldpane name asm lib} { unset Stwc($elem) } - $itk_interior.p show $oldpane - set pane $oldpane - set win [[$itk_interior.p childsite $pane].st component text] + if {$oldpane != ""} { + $itk_interior.p show $oldpane + set pane $oldpane + set win [[$itk_interior.p childsite $pane].st component text] + } } # ------------------------------------------------------------------ |