summaryrefslogtreecommitdiff
path: root/gdb/gdbtk/library/process.itb
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-05-13 00:08:58 +0000
committerJim Blandy <jimb@codesourcery.com>2003-05-13 00:08:58 +0000
commitad20141640f390ddb988537bf7d93316e5388e4b (patch)
treec1645477648a946f3973c701fb89b76e295e5bcc /gdb/gdbtk/library/process.itb
parentea1c83e1893b74392032336333d19c00a414611d (diff)
downloadgdb-cvs/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/process.itb')
-rw-r--r--gdb/gdbtk/library/process.itb162
1 files changed, 0 insertions, 162 deletions
diff --git a/gdb/gdbtk/library/process.itb b/gdb/gdbtk/library/process.itb
deleted file mode 100644
index b3aad6f9d5c..00000000000
--- a/gdb/gdbtk/library/process.itb
+++ /dev/null
@@ -1,162 +0,0 @@
-# Process window for Insight.
-# Copyright 1998, 1999, 2001, 2002 Red Hat, Inc.
-#
-# 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 a process window with a list of threads, tasks, and/or
-# processes to debug.
-#
-# ----------------------------------------------------------------------
-
-itcl::body ProcessWin::constructor {args} {
-
- window_name "Processes"
- gdbtk_busy
- build_win
- gdbtk_idle
-
- # Add hooks for this object
- add_hook gdb_no_inferior_hook [code $this idle]
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: build_win - build the main process window
-# ------------------------------------------------------------------
-itcl::body ProcessWin::build_win {} {
- global tcl_platform
-
- itk_component add slbox {
- iwidgets::scrolledlistbox $itk_interior.slbox \
- -background $::Colors(bg) \
- -selectbackground $::Colors(sbg) -selectforeground $::Colors(sfg) \
- -textfont global/fixed \
- -exportselection false \
- -selectioncommand [code $this change_context]
- } {}
- [$itk_component(slbox) component listbox] configure \
- -bg $::Colors(textbg) -fg $::Colors(textfg)
- update dummy
-
- pack $itk_component(slbox) -side left -expand yes -fill both
-}
-
-
-# ------------------------------------------------------------------
-# METHOD: update - update widget when something changes
-# ------------------------------------------------------------------
-itcl::body ProcessWin::update {event} {
- if {!$protect_me} {
-
- $itk_component(slbox) delete 0 end
- if {[catch {gdb_cmd "info thread"} threads]} {
- # failed. leave window blank
- return
- }
-
- set threads [split $threads \n]
- debug "processWin update: \n$threads"
- if {[llength $threads] == 0} {
- # no processes/threads listed.
- return
- }
-
- # insert each line one at a time
- set active -1
- set num_threads 0
- foreach line $threads {
- # Active line starts with "*"
- if {[string index $line 0] == "*"} {
- # strip off leading "*"
- set line " [string trimleft $line "*"]"
- set active $num_threads
- }
- # scan for GDB ID number at start of line
- if {[scan $line "%d" id($num_threads)] == 1} {
- $itk_component(slbox) insert end $line
- incr num_threads
- }
- }
-
- # highlight the active thread
- if {$active >= 0} {
- set active_thread $id($active)
- $itk_component(slbox) selection set $active
- $itk_component(slbox) see $active
- }
- }
-}
-
-# ------------------------------------------------------------------
-# METHOD: change_context - change the current context (active thread)
-# This method is currently ONLY called from the mouse binding
-# ------------------------------------------------------------------
-itcl::body ProcessWin::change_context {} {
- if {!$Running && [$itk_component(slbox) size] != 0} {
- gdbtk_busy
- set sel [$itk_component(slbox) curselection]
- set idnum $id($sel)
- #debug "change_context to line $sel id=$idnum"
- catch {gdb_cmd "thread $idnum"}
- # Run idle hooks and cause all widgets to update
- set protect_me 1
- gdbtk_update
- set protect_me 0
- gdbtk_idle
- }
-}
-
-# ------------------------------------------------------------------
-# DESTRUCTOR - destroy window containing widget
-# ------------------------------------------------------------------
-itcl::body ProcessWin::destructor {} {
- remove_hook gdb_no_inferior_hook [code $this no_inferior]
-}
-
-# ------------------------------------------------------------------
-# METHOD: reconfig - used when preferences change
-# ------------------------------------------------------------------
-itcl::body ProcessWin::reconfig {} {
- destroy $itk_interior.s
- if {[winfo exists $itk_interior.slbox]} { destroy $itk_interior.slbox }
- build_win
-}
-
-# ------------------------------------------------------------------
-# METHOD: busy - BusyEvent handler
-#
-# This method should accomplish blocking
-# - clicks in the window
-# - change mouse pointer
-# ------------------------------------------------------------------
-itcl::body ProcessWin::busy {event} {
- set Running 1
- cursor watch
-}
-
-# ------------------------------------------------------------------
-# METHOD: idle - handle IdleEvent
-# ------------------------------------------------------------------
-itcl::body ProcessWin::idle {event} {
- set Running 0
- cursor {}
-}
-
-# ------------------------------------------------------------------
-# METHOD: cursor - set the window cursor
-# This is a convenience method which simply sets the mouse
-# pointer to the given glyph.
-# ------------------------------------------------------------------
-itcl::body ProcessWin::cursor {glyph} {
- $_top configure -cursor $glyph
-}