GDB (API)
/home/stan/gdb/src/gdb/gdbtk/generic/gdbtk-cmds.h
Go to the documentation of this file.
00001 /* Tcl/Tk command interface for Insight
00002    Copyright (C) 2001 Free Software Foundation, Inc.
00003 
00004    This file is part of GDB.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program; if not, write to the Free Software
00018    Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019    Boston, MA 02110-1301, USA.  */
00020 
00021 #if !defined(GDBTK_CMDS_H)
00022 #define GDBTK_CMDS_H 1
00023 
00024 /* This structure filled in gdbtk_call_wrapper and passed to
00025    the wrapped call function.
00026    It stores the command pointer and arguments 
00027    run in the wrapper function. */
00028 struct wrapped_call_args
00029   {
00030     Tcl_Interp *interp;
00031     Tcl_ObjCmdProc *func;
00032     int objc;
00033     Tcl_Obj *CONST * objv;
00034     int val;
00035   };
00036 
00037 /* A generic call-wrapper to catch longjmps when calling C commands from
00038    tcl. ALL tcl commands should be wrapped in this call. */
00039 extern int gdbtk_call_wrapper (ClientData, Tcl_Interp *, int, Tcl_Obj * CONST[]);
00040 
00041 /* Returns the source (demangled) name for a function at PC. Returns empty string
00042    if not found. Memory is owned by gdb. Do not free it. */
00043 extern const char *pc_function_name (CORE_ADDR pc);
00044 
00045 /* Convenience function to sprintf something(s) into a new element in
00046    a Tcl list object. */
00047 extern void sprintf_append_element_to_obj (Tcl_Obj * objp, char *format, ...);
00048 
00049 /* printf-like function to return error messages */
00050 extern void gdbtk_set_result (Tcl_Interp *interp, const char *fmt,...);
00051 
00052 /* Module init routines: Each module of commands should be declared here. */
00053 extern int Gdbtk_Breakpoint_Init (Tcl_Interp *interp);
00054 extern int Gdbtk_Stack_Init (Tcl_Interp *interp);
00055 extern int Gdbtk_Register_Init (Tcl_Interp *interp);
00056 
00057 /* replacement for removed gdb function */
00058 char *symtab_to_filename (struct symtab *s);
00059 
00060 #endif /* GDBTK_CMDS_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines