* gdbtk-cmds.c (gdb_listfuncs): When stripping out "global destructors"

and "global constructors", do not append any elements to the result.
 	(gdb_get_vars_command): Install patch from Jun 9 1998 which appears
        to have been lost.

        Clean up some tabbing mess.
This commit is contained in:
Keith Seitz 1998-08-31 21:34:09 +00:00
parent c1b27b2228
commit 4af2d83a66
2 changed files with 293 additions and 286 deletions

View File

@ -1,3 +1,8 @@
1998-08-31 Keith Seitz <keiths@cygnus.com>
* gdbtk-cmds.c (gdb_listfuncs): When stripping out "global destructors"
and "global constructors", do not append any elements to the result.
Sun Aug 30 00:49:18 1998 Martin M. Hunt <hunt@cygnus.com>
* gdbtk-cmds.c (Gdbtk_Init): Link C variable gdb_context

View File

@ -940,8 +940,6 @@ gdb_get_vars_command (clientData, interp, objc, objv)
default:
case LOC_UNDEF: /* catches errors */
case LOC_CONST: /* constant */
case LOC_STATIC: /* static */
case LOC_REGISTER: /* register */
case LOC_TYPEDEF: /* local typedef */
case LOC_LABEL: /* local label */
case LOC_BLOCK: /* local function */
@ -961,6 +959,8 @@ gdb_get_vars_command (clientData, interp, objc, objv)
break;
case LOC_LOCAL: /* stack local */
case LOC_BASEREG: /* basereg local */
case LOC_STATIC: /* static */
case LOC_REGISTER: /* register */
if (!arguments)
Tcl_ListObjAppendElement (interp, result_ptr->obj_ptr,
Tcl_NewStringObj (SYMBOL_NAME (sym), -1));
@ -1469,6 +1469,9 @@ gdb_listfuncs (clientData, interp, objc, objv)
funcVals[0] = Tcl_NewStringObj(name, -1);
funcVals[1] = mangled;
}
else
continue;
}
else
{
@ -1520,8 +1523,8 @@ map_arg_registers (objc, objv, func, argp)
/* Else, list of register #s, just do listed regs */
for (; objc > 0; objc--, objv++)
{
if (Tcl_GetIntFromObj (NULL, *objv, &regnum) != TCL_OK) {
if (Tcl_GetIntFromObj (NULL, *objv, &regnum) != TCL_OK)
{
result_ptr->flags |= GDBTK_IN_TCL_RESULT;
return TCL_ERROR;
}
@ -2109,7 +2112,7 @@ gdb_disassemble (clientData, interp, objc, objv)
if (!symtab)
goto assembly_only;
/* First, convert the linetable to a bunch of my_line_entry's. */
/* First, convert the linetable to a bunch of my_line_entry's. */
le = symtab->linetable->item;
nlines = symtab->linetable->nitems;
@ -2121,14 +2124,14 @@ gdb_disassemble (clientData, interp, objc, objv)
out_of_order = 0;
/* Copy linetable entries for this function into our data structure, creating
/* Copy linetable entries for this function into our data structure, creating
end_pc's and setting out_of_order as appropriate. */
/* First, skip all the preceding functions. */
/* First, skip all the preceding functions. */
for (i = 0; i < nlines - 1 && le[i].pc < low; i++) ;
/* Now, copy all entries before the end of this function. */
/* Now, copy all entries before the end of this function. */
newlines = 0;
for (; i < nlines - 1 && le[i].pc < high; i++)
@ -2145,7 +2148,7 @@ gdb_disassemble (clientData, interp, objc, objv)
newlines++;
}
/* If we're on the last line, and it's part of the function, then we need to
/* If we're on the last line, and it's part of the function, then we need to
get the end pc in a special way. */
if (i == nlines - 1
@ -2158,18 +2161,18 @@ gdb_disassemble (clientData, interp, objc, objv)
newlines++;
}
/* Now, sort mle by line #s (and, then by addresses within lines). */
/* Now, sort mle by line #s (and, then by addresses within lines). */
if (out_of_order)
qsort (mle, newlines, sizeof (struct my_line_entry), compare_lines);
/* Now, for each line entry, emit the specified lines (unless they have been
/* Now, for each line entry, emit the specified lines (unless they have been
emitted before), followed by the assembly code for that line. */
next_line = 0; /* Force out first line */
for (i = 0; i < newlines; i++)
{
/* Print out everything from next_line to the current line. */
/* Print out everything from next_line to the current line. */
if (mle[i].line >= next_line)
{
@ -2194,7 +2197,7 @@ gdb_disassemble (clientData, interp, objc, objv)
}
else
{
assembly_only:
assembly_only:
for (pc = low; pc < high; )
{
QUIT;
@ -2709,7 +2712,6 @@ gdb_loadfile (clientData, interp, objc, objv)
Tcl_DStringAppend (&text_cmd_2, " insert end { } \"\"", -1);
prefix_len_2 = Tcl_DStringLength(&text_cmd_2);
while (fgets (line + 1, 980, fp))
{
if (ltable[ln >> 3] & (1 << (ln % 8)))