diff options
author | Jim Blandy <jimb@codesourcery.com> | 2003-05-13 00:08:58 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2003-05-13 00:08:58 +0000 |
commit | ad20141640f390ddb988537bf7d93316e5388e4b (patch) | |
tree | c1645477648a946f3973c701fb89b76e295e5bcc /gdb/gdbtk/library/locals.tcl | |
parent | ea1c83e1893b74392032336333d19c00a414611d (diff) | |
download | gdb-jimb-ppc64-linux-20030509-branch.tar.gz |
Patch from Will Schmidt <willschm@us.ibm.com>:jimb-ppc64-linux-20030509-branchcvs/jimb-ppc64-linux-20030509-branch
These changes enable support of PPC64 architecture.
* config/powerpc/ppc64linux.mh: New file.
* config/powerpc/ppc64linux.mt: New file.
* config/powerpc/tm-ppc64linux.h: New file.
* ppc64-linux-tdep.c: New file.
* configure.host: Add clause for powerpc64-*-linux*
* configure.tgt: Add clause for powerpc64-*-linux*
* elfread.c (record_minimal_symbol_and_info): If
DROP_TEXT_NAME_PREFIX_CHAR is #defined, then drop a leading
instance of that char from the names of text symbols.
(elf_symtab_read): If SKIP_DATA_IN_OPD is #defined, ignore data
symbols in the .opd section.
* ppc-linux-nat.c (PTRACE_XFER_TYPE): Change the default for this
to 'long'.
(PPC_PTRACE_POKEUSR_3264, PPC_PTRACE_PEEKUSR_3264,
PPC_PTRACE_POKEDATA_3264, PPC_PTRACE_PEEKDATA_3264): Provide
default definitions for these.
(ARCH64): New macro.
(ppc_wordsize_pid): New function.
(kernel_u_size): Handle 64-bit case.
(ppc_register_u_addr): Same.
(fetch_register): Use the *_3264 requests when
debugging a 64-bit process from a 32-bit GDB.
(store_register): Same.
(GDB_MAX_ALLOCA, child_xfer_memory, udot_info): Copied from
infptrace.c.
(_initialize_ppc_linux_nat): New function, to register our copy of
the udot_info command.
* ppc-linux-tdep.c (TDEP): New macro.
(ppc64_linux_svr4_fetch_link_map_offsets): New function.
(read_memory_addr): Copied from rs6000-tdep.c.
(ppc64_linux_convert_from_func_ptr_addr): New function.
* rs6000-tdep.c (skip_prologue): Recognize more instructions for
saving the 'lr' and 'cr' registers; don't just pre-emptively mask
in the 'st' opcode as soon as we see an 'mflr' or 'mfcr' opcode.
Recognize more instructions for updating the stack pointer, and
loading the TOC pointer.
(registers_powerpc64, registers_a35): New register tables.
(rs6000_gdbarch_init): Register the 64-bit solib functions.
* solib-svr4.c (solib_break_names): If SOLIB_BREAK_NAME is
#defined, include an entry for it.
(enable_break): Call CONVERT_FROM_FUNC_PTR_ADDR when trying to
guess the linker's base address.
* config/powerpc/tm-linux.h
(ppc64_linux_svr4_fetch_link_map_offsets,
ppc64_linux_convert_from_func_ptr_addr): New declarations.
Diffstat (limited to 'gdb/gdbtk/library/locals.tcl')
-rw-r--r-- | gdb/gdbtk/library/locals.tcl | 179 |
1 files changed, 0 insertions, 179 deletions
diff --git a/gdb/gdbtk/library/locals.tcl b/gdb/gdbtk/library/locals.tcl deleted file mode 100644 index 9f3f098f9f5..00000000000 --- a/gdb/gdbtk/library/locals.tcl +++ /dev/null @@ -1,179 +0,0 @@ -# Local Variable Window for Insight. -# Copyright 2002, 2003 Red Hat -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License (GPL) as published by -# the Free Software Foundation; either version 2 of the License, or (at -# your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - - -# ---------------------------------------------------------------------- -# Implements local variables windows for gdb. -# ---------------------------------------------------------------------- - -itcl::class LocalsWin { - inherit EmbeddedWin GDBWin - # ------------------------------------------------------------------ - # CONSTRUCTOR - create new locals window - # ------------------------------------------------------------------ - constructor {args} { - debug - - gdbtk_busy - build_win $itk_interior - gdbtk_idle - - add_hook gdb_no_inferior_hook "$this no_inferior" - add_hook gdb_clear_file_hook [code $this clear_file] - add_hook file_changed_hook [code $this clear_file] - - update dummy - } - - - # ------------------------------------------------------------------ - # PUBLIC METHOD: busy - BusyEvent handler - # Disable all ui elements that could affect gdb's state - # ------------------------------------------------------------------ - method busy {event} { - debug - set Running 1 - cursor watch - } - - # Re-enable the UI - method idle {event} { - debug - set Running 0 - cursor {} - } - - # ------------------------------------------------------------------ - # METHOD: no_inferior - # Reset this object. - # ------------------------------------------------------------------ - method no_inferior {} { - debug - cursor {} - set Running 0 - set _frame {} - } - - # ------------------------------------------------------------------ - # METHOD: cursor - change the toplevel's cursor - # ------------------------------------------------------------------ - method cursor {what} { - [winfo toplevel [namespace tail $this]] configure -cursor $what - ::update idletasks - } - - - # ------------------------------------------------------------------ - # METHOD: build_win - build window for variables. - # ------------------------------------------------------------------ - method build_win {f} { - #debug "$f" - - set tree [VarTree $f.tree -type "local"] - pack $f.tree -expand yes -fill both - pack $f -expand yes -fill both - - window_name "Local Variables" - ::update idletasks - } - - - # ------------------------------------------------------------------ - # METHOD: clear_file - Clear out state so that a new executable - # can be loaded. For LocalWins, this means deleting - # the Variables list. - # ------------------------------------------------------------------ - method clear_file {} { - debug - set Variables {} - } - - # ------------------------------------------------------------------ - # DESTRUCTOR - delete locals window - # ------------------------------------------------------------------ - destructor { - debug - set tree {} - - # Remove this window and all hooks - remove_hook gdb_no_inferior_hook "$this no_inferior" - remove_hook gdb_clear_file_hook [code $this clear_file] - remove_hook file_changed_hook [code $this clear_file] - - foreach var $Variables { - $var delete - } - } - - method context_switch {} { - debug - - set err [catch {gdb_selected_frame} current_frame] - #debug "1: err=$err; _frame=\"$_frame\"; current_frame=\"$current_frame\"" - - if {$err && $_frame != ""} { - # No current frame - debug "no current frame" - catch {destroy $_frame} - set _frame {} - return 1 - } elseif {$current_frame == "" && $_frame == ""} { - #debug "2" - return 0 - } elseif {$_frame == "" || $current_frame != [$_frame address]} { - # We've changed frames. If we knew something about - # the stack layout, we could be more intelligent about - # destroying variables, but we don't know that here (yet). - debug "switching to frame at $current_frame" - - # Destroy the old frame and create the new one - catch {destroy $_frame} - set _frame [Frame ::\#auto $current_frame] - debug "created new frame: $_frame at [$_frame address]" - return 1 - } - - # Nothing changed - #debug "3" - return 0 - } - - - method update {event} { - debug - - # Check that a context switch has not occured - if {[context_switch]} { - debug "CONTEXT SWITCH" - - # delete variables in tree - $tree remove all - set Variables {} - - if {$_frame != ""} { - $tree add [$_frame variables] - } - } else { - if {$_frame == ""} {return} - # check for any new variables in the same frame - $tree add [$_frame new] - } - after idle [code $tree update] - } - - protected variable Entry - protected variable Variables {} - protected variable tree - protected variable Running - protected variable _frame {} -} |