projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move C-related declarations to compile-c.h
[deliverable/binutils-gdb.git]
/
gdb
/
compile
/
compile-loc2c.c
diff --git
a/gdb/compile/compile-loc2c.c
b/gdb/compile/compile-loc2c.c
index 81684d133c63db529a0879134807e64f90c99735..bd080f85fbb24138b0a436bffb3fe46d9769163c 100644
(file)
--- a/
gdb/compile/compile-loc2c.c
+++ b/
gdb/compile/compile-loc2c.c
@@
-1,6
+1,6
@@
/* Convert a DWARF location expression to C
/* Convert a DWARF location expression to C
- Copyright (C) 2014-201
7
Free Software Foundation, Inc.
+ Copyright (C) 2014-201
8
Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-24,6
+24,7
@@
#include "ui-file.h"
#include "utils.h"
#include "compile-internal.h"
#include "ui-file.h"
#include "utils.h"
#include "compile-internal.h"
+#include "compile-c.h"
#include "compile.h"
#include "block.h"
#include "dwarf2-frame.h"
#include "compile.h"
#include "block.h"
#include "dwarf2-frame.h"
@@
-62,7
+63,7
@@
struct insn_info
NEED_TEMPVAR is an out parameter which is set if this expression
needs a special temporary variable to be emitted (see the code
generator).
NEED_TEMPVAR is an out parameter which is set if this expression
needs a special temporary variable to be emitted (see the code
generator).
- INFO is a
n array
of insn_info objects, indexed by offset from the
+ INFO is a
vector
of insn_info objects, indexed by offset from the
start of the DWARF expression.
TO_DO is a list of bytecodes which must be examined; it may be
added to by this function.
start of the DWARF expression.
TO_DO is a list of bytecodes which must be examined; it may be
added to by this function.
@@
-71,8
+72,8
@@
struct insn_info
static void
compute_stack_depth_worker (int start, int *need_tempvar,
static void
compute_stack_depth_worker (int start, int *need_tempvar,
- st
ruct insn_info
*info,
-
VEC (int) *
*to_do,
+ st
d::vector<struct insn_info>
*info,
+
std::vector<int>
*to_do,
enum bfd_endian byte_order, unsigned int addr_size,
const gdb_byte *op_ptr, const gdb_byte *op_end)
{
enum bfd_endian byte_order, unsigned int addr_size,
const gdb_byte *op_ptr, const gdb_byte *op_end)
{
@@
-80,8
+81,8
@@
compute_stack_depth_worker (int start, int *need_tempvar,
int stack_depth;
op_ptr += start;
int stack_depth;
op_ptr += start;
- gdb_assert (
info
[start].visited);
- stack_depth =
info
[start].depth;
+ gdb_assert (
(*info)
[start].visited);
+ stack_depth =
(*info)
[start].depth;
while (op_ptr < op_end)
{
while (op_ptr < op_end)
{
@@
-91,16
+92,16
@@
compute_stack_depth_worker (int start, int *need_tempvar,
int ndx = op_ptr - base;
#define SET_CHECK_DEPTH(WHERE) \
int ndx = op_ptr - base;
#define SET_CHECK_DEPTH(WHERE) \
- if (
info[WHERE].visited)
\
+ if (
(*info)[WHERE].visited)
\
{ \
{ \
- if (
info[WHERE].depth != stack_depth)
\
+ if (
(*info)[WHERE].depth != stack_depth)
\
error (_("inconsistent stack depths")); \
} \
else \
{ \
/* Stack depth not set, so set it. */ \
error (_("inconsistent stack depths")); \
} \
else \
{ \
/* Stack depth not set, so set it. */ \
-
info[WHERE].visited = 1;
\
-
info[WHERE].depth = stack_depth;
\
+
(*info)[WHERE].visited = 1;
\
+
(*info)[WHERE].depth = stack_depth;
\
}
SET_CHECK_DEPTH (ndx);
}
SET_CHECK_DEPTH (ndx);
@@
-324,7
+325,7
@@
compute_stack_depth_worker (int start, int *need_tempvar,
case DW_OP_GNU_push_tls_address:
case DW_OP_form_tls_address:
case DW_OP_GNU_push_tls_address:
case DW_OP_form_tls_address:
-
info
[ndx].is_tls = 1;
+
(*info)
[ndx].is_tls = 1;
break;
case DW_OP_skip:
break;
case DW_OP_skip:
@@
-333,10
+334,10
@@
compute_stack_depth_worker (int start, int *need_tempvar,
offset = op_ptr + offset - base;
/* If the destination has not been seen yet, add it to the
to-do list. */
offset = op_ptr + offset - base;
/* If the destination has not been seen yet, add it to the
to-do list. */
- if (!
info
[offset].visited)
-
VEC_safe_push (int, *to_do,
offset);
+ if (!
(*info)
[offset].visited)
+
to_do->push_back (
offset);
SET_CHECK_DEPTH (offset);
SET_CHECK_DEPTH (offset);
-
info
[offset].label = 1;
+
(*info)
[offset].label = 1;
/* We're done with this line of code. */
return;
/* We're done with this line of code. */
return;
@@
-347,10
+348,10
@@
compute_stack_depth_worker (int start, int *need_tempvar,
--stack_depth;
/* If the destination has not been seen yet, add it to the
to-do list. */
--stack_depth;
/* If the destination has not been seen yet, add it to the
to-do list. */
- if (!
info
[offset].visited)
-
VEC_safe_push (int, *to_do,
offset);
+ if (!
(*info)
[offset].visited)
+
to_do->push_back (
offset);
SET_CHECK_DEPTH (offset);
SET_CHECK_DEPTH (offset);
-
info
[offset].label = 1;
+
(*info)
[offset].label = 1;
break;
case DW_OP_nop:
break;
case DW_OP_nop:
@@
-387,27
+388,23
@@
compute_stack_depth (enum bfd_endian byte_order, unsigned int addr_size,
int *need_tempvar, int *is_tls,
const gdb_byte *op_ptr, const gdb_byte *op_end,
int initial_depth,
int *need_tempvar, int *is_tls,
const gdb_byte *op_ptr, const gdb_byte *op_end,
int initial_depth,
- st
ruct insn_info *
*info)
+ st
d::vector<struct insn_info>
*info)
{
{
- unsigned char *set;
- struct cleanup *outer_cleanup, *cleanup;
- VEC (int) *to_do = NULL;
+ std::vector<int> to_do;
int stack_depth, i;
int stack_depth, i;
- *info = XCNEWVEC (struct insn_info, op_end - op_ptr);
- outer_cleanup = make_cleanup (xfree, *info);
-
- cleanup = make_cleanup (VEC_cleanup (int), &to_do);
+ info->resize (op_end - op_ptr);
-
VEC_safe_push (int, to_do,
0);
+
to_do.push_back (
0);
(*info)[0].depth = initial_depth;
(*info)[0].visited = 1;
(*info)[0].depth = initial_depth;
(*info)[0].visited = 1;
- while (!
VEC_empty (int, to_do
))
+ while (!
to_do.empty (
))
{
{
- int ndx = VEC_pop (int, to_do);
+ int ndx = to_do.back ();
+ to_do.pop_back ();
- compute_stack_depth_worker (ndx, need_tempvar,
*
info, &to_do,
+ compute_stack_depth_worker (ndx, need_tempvar, info, &to_do,
byte_order, addr_size,
op_ptr, op_end);
}
byte_order, addr_size,
op_ptr, op_end);
}
@@
-422,8
+419,6
@@
compute_stack_depth (enum bfd_endian byte_order, unsigned int addr_size,
*is_tls = 1;
}
*is_tls = 1;
}
- do_cleanups (cleanup);
- discard_cleanups (outer_cleanup);
return stack_depth + 1;
}
return stack_depth + 1;
}
@@
-435,9
+430,9
@@
compute_stack_depth (enum bfd_endian byte_order, unsigned int addr_size,
/* Emit code to push a constant. */
static void
/* Emit code to push a constant. */
static void
-push (int indent, str
uct ui_file *
stream, ULONGEST l)
+push (int indent, str
ing_file &
stream, ULONGEST l)
{
{
- fprintfi_filtered (indent, stream,
+ fprintfi_filtered (indent,
&
stream,
"__gdb_stack[++__gdb_tos] = (" GCC_UINTPTR ") %s;\n",
hex_string (l));
}
"__gdb_stack[++__gdb_tos] = (" GCC_UINTPTR ") %s;\n",
hex_string (l));
}
@@
-445,57
+440,57
@@
push (int indent, struct ui_file *stream, ULONGEST l)
/* Emit code to push an arbitrary expression. This works like
printf. */
/* Emit code to push an arbitrary expression. This works like
printf. */
-static void pushf (int indent, str
uct ui_file *
stream, const char *format, ...)
+static void pushf (int indent, str
ing_file &
stream, const char *format, ...)
ATTRIBUTE_PRINTF (3, 4);
static void
ATTRIBUTE_PRINTF (3, 4);
static void
-pushf (int indent, str
uct ui_file *
stream, const char *format, ...)
+pushf (int indent, str
ing_file &
stream, const char *format, ...)
{
va_list args;
{
va_list args;
- fprintfi_filtered (indent, stream, "__gdb_stack[__gdb_tos + 1] = ");
+ fprintfi_filtered (indent,
&
stream, "__gdb_stack[__gdb_tos + 1] = ");
va_start (args, format);
va_start (args, format);
-
vfprintf_filtered (stream,
format, args);
+
stream.vprintf (
format, args);
va_end (args);
va_end (args);
-
fprintf_filtered (stream,
";\n");
+
stream.puts (
";\n");
- fprintfi_filtered (indent, stream, "++__gdb_tos;\n");
+ fprintfi_filtered (indent,
&
stream, "++__gdb_tos;\n");
}
/* Emit code for a unary expression -- one which operates in-place on
the top-of-stack. This works like printf. */
}
/* Emit code for a unary expression -- one which operates in-place on
the top-of-stack. This works like printf. */
-static void unary (int indent, str
uct ui_file *
stream, const char *format, ...)
+static void unary (int indent, str
ing_file &
stream, const char *format, ...)
ATTRIBUTE_PRINTF (3, 4);
static void
ATTRIBUTE_PRINTF (3, 4);
static void
-unary (int indent, str
uct ui_file *
stream, const char *format, ...)
+unary (int indent, str
ing_file &
stream, const char *format, ...)
{
va_list args;
{
va_list args;
- fprintfi_filtered (indent, stream, "__gdb_stack[__gdb_tos] = ");
+ fprintfi_filtered (indent,
&
stream, "__gdb_stack[__gdb_tos] = ");
va_start (args, format);
va_start (args, format);
-
vfprintf_filtered (stream,
format, args);
+
stream.vprintf (
format, args);
va_end (args);
va_end (args);
-
fprintf_filtered (stream,
";\n");
+
stream.puts (
";\n");
}
/* Emit code for a unary expression -- one which uses the top two
stack items, popping the topmost one. This works like printf. */
}
/* Emit code for a unary expression -- one which uses the top two
stack items, popping the topmost one. This works like printf. */
-static void binary (int indent, str
uct ui_file *
stream, const char *format, ...)
+static void binary (int indent, str
ing_file &
stream, const char *format, ...)
ATTRIBUTE_PRINTF (3, 4);
static void
ATTRIBUTE_PRINTF (3, 4);
static void
-binary (int indent, str
uct ui_file *
stream, const char *format, ...)
+binary (int indent, str
ing_file &
stream, const char *format, ...)
{
va_list args;
{
va_list args;
- fprintfi_filtered (indent, stream, "__gdb_stack[__gdb_tos - 1] = ");
+ fprintfi_filtered (indent,
&
stream, "__gdb_stack[__gdb_tos - 1] = ");
va_start (args, format);
va_start (args, format);
-
vfprintf_filtered (stream,
format, args);
+
stream.vprintf (
format, args);
va_end (args);
va_end (args);
-
fprintf_filtered (stream,
";\n");
- fprintfi_filtered (indent, stream, "--__gdb_tos;\n");
+
stream.puts (
";\n");
+ fprintfi_filtered (indent,
&
stream, "--__gdb_tos;\n");
}
/* Print the name of a label given its "SCOPE", an arbitrary integer
}
/* Print the name of a label given its "SCOPE", an arbitrary integer
@@
-503,10
+498,9
@@
binary (int indent, struct ui_file *stream, const char *format, ...)
corresponding to the label's point of definition. */
static void
corresponding to the label's point of definition. */
static void
-print_label (str
uct ui_file *
stream, unsigned int scope, int target)
+print_label (str
ing_file &
stream, unsigned int scope, int target)
{
{
- fprintf_filtered (stream, "__label_%u_%s",
- scope, pulongest (target));
+ stream.printf ("__label_%u_%s", scope, pulongest (target));
}
/* Emit code that pushes a register's address on the stack.
}
/* Emit code that pushes a register's address on the stack.
@@
-514,19
+508,16
@@
print_label (struct ui_file *stream, unsigned int scope, int target)
register was needed by this expression. */
static void
register was needed by this expression. */
static void
-pushf_register_address (int indent, str
uct ui_file *
stream,
+pushf_register_address (int indent, str
ing_file &
stream,
unsigned char *registers_used,
struct gdbarch *gdbarch, int regnum)
{
unsigned char *registers_used,
struct gdbarch *gdbarch, int regnum)
{
- char *regname = compile_register_name_mangled (gdbarch, regnum);
- struct cleanup *cleanups = make_cleanup (xfree, regname);
+ std::string regname = compile_register_name_mangled (gdbarch, regnum);
registers_used[regnum] = 1;
pushf (indent, stream,
"(" GCC_UINTPTR ") &" COMPILE_I_SIMPLE_REGISTER_ARG_NAME "->%s",
registers_used[regnum] = 1;
pushf (indent, stream,
"(" GCC_UINTPTR ") &" COMPILE_I_SIMPLE_REGISTER_ARG_NAME "->%s",
- regname);
-
- do_cleanups (cleanups);
+ regname.c_str ());
}
/* Emit code that pushes a register's value on the stack.
}
/* Emit code that pushes a register's value on the stack.
@@
-535,23
+526,20
@@
pushf_register_address (int indent, struct ui_file *stream,
register's value before it is pushed. */
static void
register's value before it is pushed. */
static void
-pushf_register (int indent, str
uct ui_file *
stream,
+pushf_register (int indent, str
ing_file &
stream,
unsigned char *registers_used,
struct gdbarch *gdbarch, int regnum, uint64_t offset)
{
unsigned char *registers_used,
struct gdbarch *gdbarch, int regnum, uint64_t offset)
{
- char *regname = compile_register_name_mangled (gdbarch, regnum);
- struct cleanup *cleanups = make_cleanup (xfree, regname);
+ std::string regname = compile_register_name_mangled (gdbarch, regnum);
registers_used[regnum] = 1;
if (offset == 0)
pushf (indent, stream, COMPILE_I_SIMPLE_REGISTER_ARG_NAME "->%s",
registers_used[regnum] = 1;
if (offset == 0)
pushf (indent, stream, COMPILE_I_SIMPLE_REGISTER_ARG_NAME "->%s",
- regname);
+ regname
.c_str ()
);
else
pushf (indent, stream,
COMPILE_I_SIMPLE_REGISTER_ARG_NAME "->%s + (" GCC_UINTPTR ") %s",
else
pushf (indent, stream,
COMPILE_I_SIMPLE_REGISTER_ARG_NAME "->%s + (" GCC_UINTPTR ") %s",
- regname, hex_string (offset));
-
- do_cleanups (cleanups);
+ regname.c_str (), hex_string (offset));
}
/* Compile a DWARF expression to C code.
}
/* Compile a DWARF expression to C code.
@@
-584,7
+572,7
@@
pushf_register (int indent, struct ui_file *stream,
things. */
static void
things. */
static void
-do_compile_dwarf_expr_to_c (int indent, str
uct ui_file *
stream,
+do_compile_dwarf_expr_to_c (int indent, str
ing_file &
stream,
const char *type_name,
const char *result_name,
struct symbol *sym, CORE_ADDR pc,
const char *type_name,
const char *result_name,
struct symbol *sym, CORE_ADDR pc,
@@
-603,22
+591,20
@@
do_compile_dwarf_expr_to_c (int indent, struct ui_file *stream,
const gdb_byte * const base = op_ptr;
int need_tempvar = 0;
int is_tls = 0;
const gdb_byte * const base = op_ptr;
int need_tempvar = 0;
int is_tls = 0;
- struct cleanup *cleanup;
- struct insn_info *info;
+ std::vector<struct insn_info> info;
int stack_depth;
++scope;
int stack_depth;
++scope;
- fprintfi_filtered (indent, stream, "__attribute__ ((unused)) %s %s;\n",
+ fprintfi_filtered (indent,
&
stream, "__attribute__ ((unused)) %s %s;\n",
type_name, result_name);
type_name, result_name);
- fprintfi_filtered (indent, stream, "{\n");
+ fprintfi_filtered (indent,
&
stream, "{\n");
indent += 2;
stack_depth = compute_stack_depth (byte_order, addr_size,
&need_tempvar, &is_tls,
op_ptr, op_end, initial != NULL,
&info);
indent += 2;
stack_depth = compute_stack_depth (byte_order, addr_size,
&need_tempvar, &is_tls,
op_ptr, op_end, initial != NULL,
&info);
- cleanup = make_cleanup (xfree, info);
/* This is a hack until we can add a feature to glibc to let us
properly generate code for TLS. You might think we could emit
/* This is a hack until we can add a feature to glibc to let us
properly generate code for TLS. You might think we could emit
@@
-648,20
+634,19
@@
do_compile_dwarf_expr_to_c (int indent, struct ui_file *stream,
"compiled code."),
SYMBOL_PRINT_NAME (sym));
"compiled code."),
SYMBOL_PRINT_NAME (sym));
- fprintfi_filtered (indent, stream, "%s = %s;\n",
+ fprintfi_filtered (indent,
&
stream, "%s = %s;\n",
result_name,
core_addr_to_string (value_address (val)));
result_name,
core_addr_to_string (value_address (val)));
- fprintfi_filtered (indent - 2, stream, "}\n");
- do_cleanups (cleanup);
+ fprintfi_filtered (indent - 2, &stream, "}\n");
return;
}
return;
}
- fprintfi_filtered (indent, stream, GCC_UINTPTR " __gdb_stack[%d];\n",
+ fprintfi_filtered (indent,
&
stream, GCC_UINTPTR " __gdb_stack[%d];\n",
stack_depth);
if (need_tempvar)
stack_depth);
if (need_tempvar)
- fprintfi_filtered (indent, stream, GCC_UINTPTR " __gdb_tmp;\n");
- fprintfi_filtered (indent, stream, "int __gdb_tos = -1;\n");
+ fprintfi_filtered (indent,
&
stream, GCC_UINTPTR " __gdb_tmp;\n");
+ fprintfi_filtered (indent,
&
stream, "int __gdb_tos = -1;\n");
if (initial != NULL)
pushf (indent, stream, "%s", core_addr_to_string (*initial));
if (initial != NULL)
pushf (indent, stream, "%s", core_addr_to_string (*initial));
@@
-672,13
+657,13
@@
do_compile_dwarf_expr_to_c (int indent, struct ui_file *stream,
uint64_t uoffset, reg;
int64_t offset;
uint64_t uoffset, reg;
int64_t offset;
- print_spaces (indent - 2, stream);
+ print_spaces (indent - 2,
&
stream);
if (info[op_ptr - base].label)
{
print_label (stream, scope, op_ptr - base);
if (info[op_ptr - base].label)
{
print_label (stream, scope, op_ptr - base);
-
fprintf_filtered (stream,
":;");
+
stream.puts (
":;");
}
}
-
fprintf_filtered (stream,
"/* %s */\n", get_DW_OP_name (op));
+
stream.printf (
"/* %s */\n", get_DW_OP_name (op));
/* This is handy for debugging the generated code:
fprintf_filtered (stream, "if (__gdb_tos != %d) abort ();\n",
/* This is handy for debugging the generated code:
fprintf_filtered (stream, "if (__gdb_tos != %d) abort ();\n",
@@
-725,6
+710,7
@@
do_compile_dwarf_expr_to_c (int indent, struct ui_file *stream,
break;
case DW_OP_addr:
break;
case DW_OP_addr:
+ uoffset = extract_unsigned_integer (op_ptr, addr_size, byte_order);
op_ptr += addr_size;
/* Some versions of GCC emit DW_OP_addr before
DW_OP_GNU_push_tls_address. In this case the value is an
op_ptr += addr_size;
/* Some versions of GCC emit DW_OP_addr before
DW_OP_GNU_push_tls_address. In this case the value is an
@@
-919,7
+905,7
@@
do_compile_dwarf_expr_to_c (int indent, struct ui_file *stream,
break;
case DW_OP_drop:
break;
case DW_OP_drop:
- fprintfi_filtered (indent, stream, "--__gdb_tos;\n");
+ fprintfi_filtered (indent,
&
stream, "--__gdb_tos;\n");
break;
case DW_OP_pick:
break;
case DW_OP_pick:
@@
-929,13
+915,13
@@
do_compile_dwarf_expr_to_c (int indent, struct ui_file *stream,
break;
case DW_OP_swap:
break;
case DW_OP_swap:
- fprintfi_filtered (indent, stream,
+ fprintfi_filtered (indent,
&
stream,
"__gdb_tmp = __gdb_stack[__gdb_tos - 1];\n");
"__gdb_tmp = __gdb_stack[__gdb_tos - 1];\n");
- fprintfi_filtered (indent, stream,
+ fprintfi_filtered (indent,
&
stream,
"__gdb_stack[__gdb_tos - 1] = "
"__gdb_stack[__gdb_tos];\n");
"__gdb_stack[__gdb_tos - 1] = "
"__gdb_stack[__gdb_tos];\n");
- fprintfi_filtered (indent, stream, ("__gdb_stack[__gdb_tos] = "
- "__gdb_tmp;\n"));
+ fprintfi_filtered (indent,
&
stream, ("__gdb_stack[__gdb_tos] = "
+
"__gdb_tmp;\n"));
break;
case DW_OP_over:
break;
case DW_OP_over:
@@
-943,15
+929,15
@@
do_compile_dwarf_expr_to_c (int indent, struct ui_file *stream,
break;
case DW_OP_rot:
break;
case DW_OP_rot:
- fprintfi_filtered (indent, stream, ("__gdb_tmp = "
- "__gdb_stack[__gdb_tos];\n"));
- fprintfi_filtered (indent, stream,
+ fprintfi_filtered (indent,
&
stream, ("__gdb_tmp = "
+
"__gdb_stack[__gdb_tos];\n"));
+ fprintfi_filtered (indent,
&
stream,
"__gdb_stack[__gdb_tos] = "
"__gdb_stack[__gdb_tos - 1];\n");
"__gdb_stack[__gdb_tos] = "
"__gdb_stack[__gdb_tos - 1];\n");
- fprintfi_filtered (indent, stream,
+ fprintfi_filtered (indent,
&
stream,
"__gdb_stack[__gdb_tos - 1] = "
"__gdb_stack[__gdb_tos -2];\n");
"__gdb_stack[__gdb_tos - 1] = "
"__gdb_stack[__gdb_tos -2];\n");
- fprintfi_filtered (indent, stream, "__gdb_stack[__gdb_tos - 2] = "
+ fprintfi_filtered (indent,
&
stream, "__gdb_stack[__gdb_tos - 2] = "
"__gdb_tmp;\n");
break;
"__gdb_tmp;\n");
break;
@@
-973,7
+959,7
@@
do_compile_dwarf_expr_to_c (int indent, struct ui_file *stream,
/* Cast to a pointer of the desired type, then
dereference. */
/* Cast to a pointer of the desired type, then
dereference. */
- fprintfi_filtered (indent, stream,
+ fprintfi_filtered (indent,
&
stream,
"__gdb_stack[__gdb_tos] = "
"*((__gdb_int_%s *) "
"__gdb_stack[__gdb_tos]);\n",
"__gdb_stack[__gdb_tos] = "
"*((__gdb_int_%s *) "
"__gdb_stack[__gdb_tos]);\n",
@@
-1099,19
+1085,19
@@
do_compile_dwarf_expr_to_c (int indent, struct ui_file *stream,
case DW_OP_skip:
offset = extract_signed_integer (op_ptr, 2, byte_order);
op_ptr += 2;
case DW_OP_skip:
offset = extract_signed_integer (op_ptr, 2, byte_order);
op_ptr += 2;
- fprintfi_filtered (indent, stream, "goto ");
+ fprintfi_filtered (indent,
&
stream, "goto ");
print_label (stream, scope, op_ptr + offset - base);
print_label (stream, scope, op_ptr + offset - base);
-
fprintf_filtered (stream,
";\n");
+
stream.puts (
";\n");
break;
case DW_OP_bra:
offset = extract_signed_integer (op_ptr, 2, byte_order);
op_ptr += 2;
break;
case DW_OP_bra:
offset = extract_signed_integer (op_ptr, 2, byte_order);
op_ptr += 2;
- fprintfi_filtered (indent, stream,
+ fprintfi_filtered (indent,
&
stream,
"if ((( " GCC_INTPTR
") __gdb_stack[__gdb_tos--]) != 0) goto ");
print_label (stream, scope, op_ptr + offset - base);
"if ((( " GCC_INTPTR
") __gdb_stack[__gdb_tos--]) != 0) goto ");
print_label (stream, scope, op_ptr + offset - base);
-
fprintf_filtered (stream,
";\n");
+
stream.puts (
";\n");
break;
case DW_OP_nop:
break;
case DW_OP_nop:
@@
-1122,17
+1108,15
@@
do_compile_dwarf_expr_to_c (int indent, struct ui_file *stream,
}
}
}
}
- fprintfi_filtered (indent, stream, "%s = __gdb_stack[__gdb_tos];\n",
+ fprintfi_filtered (indent,
&
stream, "%s = __gdb_stack[__gdb_tos];\n",
result_name);
result_name);
- fprintfi_filtered (indent - 2, stream, "}\n");
-
- do_cleanups (cleanup);
+ fprintfi_filtered (indent - 2, &stream, "}\n");
}
/* See compile.h. */
void
}
/* See compile.h. */
void
-compile_dwarf_expr_to_c (str
uct ui_file *
stream, const char *result_name,
+compile_dwarf_expr_to_c (str
ing_file &
stream, const char *result_name,
struct symbol *sym, CORE_ADDR pc,
struct gdbarch *arch, unsigned char *registers_used,
unsigned int addr_size,
struct symbol *sym, CORE_ADDR pc,
struct gdbarch *arch, unsigned char *registers_used,
unsigned int addr_size,
@@
-1147,7
+1131,7
@@
compile_dwarf_expr_to_c (struct ui_file *stream, const char *result_name,
/* See compile.h. */
void
/* See compile.h. */
void
-compile_dwarf_bounds_to_c (str
uct ui_file *
stream,
+compile_dwarf_bounds_to_c (str
ing_file &
stream,
const char *result_name,
const struct dynamic_prop *prop,
struct symbol *sym, CORE_ADDR pc,
const char *result_name,
const struct dynamic_prop *prop,
struct symbol *sym, CORE_ADDR pc,
This page took
0.033915 seconds
and
4
git commands to generate.