1 /* Convert a DWARF location expression to C
3 Copyright (C) 2014-2022 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 #include "dwarf2/expr.h"
24 #include "dwarf2/loc.h"
25 #include "dwarf2/read.h"
28 #include "compile-internal.h"
29 #include "compile-c.h"
32 #include "dwarf2/frame.h"
33 #include "gdbsupport/gdb_vecs.h"
39 /* Information about a given instruction. */
43 /* Stack depth at entry. */
47 /* Whether this instruction has been visited. */
49 unsigned int visited
: 1;
51 /* Whether this instruction needs a label. */
53 unsigned int label
: 1;
55 /* Whether this instruction is DW_OP_GNU_push_tls_address or
56 DW_OP_form_tls_address. This is a hack until we can add a
57 feature to glibc to let us properly generate code for TLS. */
59 unsigned int is_tls
: 1;
62 /* A helper function for compute_stack_depth that does the work. This
63 examines the DWARF expression starting from START and computes
66 NEED_TEMPVAR is an out parameter which is set if this expression
67 needs a special temporary variable to be emitted (see the code
69 INFO is a vector of insn_info objects, indexed by offset from the
70 start of the DWARF expression.
71 TO_DO is a list of bytecodes which must be examined; it may be
72 added to by this function.
73 BYTE_ORDER and ADDR_SIZE describe this bytecode in the obvious way.
74 OP_PTR and OP_END are the bounds of the DWARF expression. */
77 compute_stack_depth_worker (int start
, int *need_tempvar
,
78 std::vector
<struct insn_info
> *info
,
79 std::vector
<int> *to_do
,
80 enum bfd_endian byte_order
, unsigned int addr_size
,
81 const gdb_byte
*op_ptr
, const gdb_byte
*op_end
)
83 const gdb_byte
* const base
= op_ptr
;
87 gdb_assert ((*info
)[start
].visited
);
88 stack_depth
= (*info
)[start
].depth
;
90 while (op_ptr
< op_end
)
92 enum dwarf_location_atom op
= (enum dwarf_location_atom
) *op_ptr
;
95 int ndx
= op_ptr
- base
;
97 #define SET_CHECK_DEPTH(WHERE) \
98 if ((*info)[WHERE].visited) \
100 if ((*info)[WHERE].depth != stack_depth) \
101 error (_("inconsistent stack depths")); \
105 /* Stack depth not set, so set it. */ \
106 (*info)[WHERE].visited = 1; \
107 (*info)[WHERE].depth = stack_depth; \
110 SET_CHECK_DEPTH (ndx
);
178 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
218 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, ®
);
254 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
259 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, ®
);
260 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
265 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
297 case DW_OP_deref_size
:
301 case DW_OP_plus_uconst
:
302 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, ®
);
325 case DW_OP_call_frame_cfa
:
329 case DW_OP_GNU_push_tls_address
:
330 case DW_OP_form_tls_address
:
331 (*info
)[ndx
].is_tls
= 1;
335 offset
= extract_signed_integer (op_ptr
, 2, byte_order
);
337 offset
= op_ptr
+ offset
- base
;
338 /* If the destination has not been seen yet, add it to the
340 if (!(*info
)[offset
].visited
)
341 to_do
->push_back (offset
);
342 SET_CHECK_DEPTH (offset
);
343 (*info
)[offset
].label
= 1;
344 /* We're done with this line of code. */
348 offset
= extract_signed_integer (op_ptr
, 2, byte_order
);
350 offset
= op_ptr
+ offset
- base
;
352 /* If the destination has not been seen yet, add it to the
354 if (!(*info
)[offset
].visited
)
355 to_do
->push_back (offset
);
356 SET_CHECK_DEPTH (offset
);
357 (*info
)[offset
].label
= 1;
364 error (_("unhandled DWARF op: %s"), get_DW_OP_name (op
));
368 gdb_assert (op_ptr
== op_end
);
370 #undef SET_CHECK_DEPTH
373 /* Compute the maximum needed stack depth of a DWARF expression, and
374 some other information as well.
376 BYTE_ORDER and ADDR_SIZE describe this bytecode in the obvious way.
377 NEED_TEMPVAR is an out parameter which is set if this expression
378 needs a special temporary variable to be emitted (see the code
380 IS_TLS is an out parameter which is set if this expression refers
382 OP_PTR and OP_END are the bounds of the DWARF expression.
383 INITIAL_DEPTH is the initial depth of the DWARF expression stack.
384 INFO is an array of insn_info objects, indexed by offset from the
385 start of the DWARF expression.
387 This returns the maximum stack depth. */
390 compute_stack_depth (enum bfd_endian byte_order
, unsigned int addr_size
,
391 int *need_tempvar
, int *is_tls
,
392 const gdb_byte
*op_ptr
, const gdb_byte
*op_end
,
394 std::vector
<struct insn_info
> *info
)
396 std::vector
<int> to_do
;
399 info
->resize (op_end
- op_ptr
);
402 (*info
)[0].depth
= initial_depth
;
403 (*info
)[0].visited
= 1;
405 while (!to_do
.empty ())
407 int ndx
= to_do
.back ();
410 compute_stack_depth_worker (ndx
, need_tempvar
, info
, &to_do
,
411 byte_order
, addr_size
,
417 for (i
= 0; i
< op_end
- op_ptr
; ++i
)
419 if ((*info
)[i
].depth
> stack_depth
)
420 stack_depth
= (*info
)[i
].depth
;
421 if ((*info
)[i
].is_tls
)
425 return stack_depth
+ 1;
430 #define GCC_UINTPTR "__gdb_uintptr"
431 #define GCC_INTPTR "__gdb_intptr"
433 /* Emit code to push a constant. */
436 push (int indent
, string_file
*stream
, ULONGEST l
)
438 fprintf_filtered (stream
,
439 "%*s__gdb_stack[++__gdb_tos] = (" GCC_UINTPTR
") %s;\n",
440 indent
, "", hex_string (l
));
443 /* Emit code to push an arbitrary expression. This works like
446 static void pushf (int indent
, string_file
*stream
, const char *format
, ...)
447 ATTRIBUTE_PRINTF (3, 4);
450 pushf (int indent
, string_file
*stream
, const char *format
, ...)
454 fprintf_filtered (stream
, "%*s__gdb_stack[__gdb_tos + 1] = ", indent
, "");
455 va_start (args
, format
);
456 stream
->vprintf (format
, args
);
458 stream
->puts (";\n");
460 fprintf_filtered (stream
, "%*s++__gdb_tos;\n", indent
, "");
463 /* Emit code for a unary expression -- one which operates in-place on
464 the top-of-stack. This works like printf. */
466 static void unary (int indent
, string_file
*stream
, const char *format
, ...)
467 ATTRIBUTE_PRINTF (3, 4);
470 unary (int indent
, string_file
*stream
, const char *format
, ...)
474 fprintf_filtered (stream
, "%*s__gdb_stack[__gdb_tos] = ", indent
, "");
475 va_start (args
, format
);
476 stream
->vprintf (format
, args
);
478 stream
->puts (";\n");
481 /* Emit code for a unary expression -- one which uses the top two
482 stack items, popping the topmost one. This works like printf. */
483 static void binary (int indent
, string_file
*stream
, const char *format
, ...)
484 ATTRIBUTE_PRINTF (3, 4);
487 binary (int indent
, string_file
*stream
, const char *format
, ...)
491 fprintf_filtered (stream
, "%*s__gdb_stack[__gdb_tos - 1] = ", indent
, "");
492 va_start (args
, format
);
493 stream
->vprintf (format
, args
);
495 stream
->puts (";\n");
496 fprintf_filtered (stream
, "%*s--__gdb_tos;\n", indent
, "");
499 /* Print the name of a label given its "SCOPE", an arbitrary integer
500 used for uniqueness, and its TARGET, the bytecode offset
501 corresponding to the label's point of definition. */
504 print_label (string_file
*stream
, unsigned int scope
, int target
)
506 stream
->printf ("__label_%u_%s", scope
, pulongest (target
));
509 /* Note that a register was used. */
512 note_register (int regnum
, std::vector
<bool> ®isters_used
)
514 gdb_assert (regnum
>= 0);
515 /* If the expression uses a cooked register, then we currently can't
516 compile it. We would need a gdbarch method to handle this
518 if (regnum
>= registers_used
.size ())
519 error (_("Expression uses \"cooked\" register and cannot be compiled."));
520 registers_used
[regnum
] = true;
523 /* Emit code that pushes a register's address on the stack.
524 REGISTERS_USED is an out parameter which is updated to note which
525 register was needed by this expression. */
528 pushf_register_address (int indent
, string_file
*stream
,
529 std::vector
<bool> ®isters_used
,
530 struct gdbarch
*gdbarch
, int regnum
)
532 std::string regname
= compile_register_name_mangled (gdbarch
, regnum
);
534 note_register (regnum
, registers_used
);
535 pushf (indent
, stream
,
536 "(" GCC_UINTPTR
") &" COMPILE_I_SIMPLE_REGISTER_ARG_NAME
"->%s",
540 /* Emit code that pushes a register's value on the stack.
541 REGISTERS_USED is an out parameter which is updated to note which
542 register was needed by this expression. OFFSET is added to the
543 register's value before it is pushed. */
546 pushf_register (int indent
, string_file
*stream
,
547 std::vector
<bool> ®isters_used
,
548 struct gdbarch
*gdbarch
, int regnum
, uint64_t offset
)
550 std::string regname
= compile_register_name_mangled (gdbarch
, regnum
);
552 note_register (regnum
, registers_used
);
554 pushf (indent
, stream
, COMPILE_I_SIMPLE_REGISTER_ARG_NAME
"->%s",
557 pushf (indent
, stream
,
558 COMPILE_I_SIMPLE_REGISTER_ARG_NAME
"->%s + (" GCC_UINTPTR
") %s",
559 regname
.c_str (), hex_string (offset
));
562 /* Compile a DWARF expression to C code.
564 INDENT is the indentation level to use.
565 STREAM is the stream where the code should be written.
567 TYPE_NAME names the type of the result of the DWARF expression.
568 For locations this is "void *" but for array bounds it will be an
571 RESULT_NAME is the name of a variable in the resulting C code. The
572 result of the expression will be assigned to this variable.
574 SYM is the symbol corresponding to this expression.
575 PC is the location at which the expression is being evaluated.
576 ARCH is the architecture to use.
578 REGISTERS_USED is an out parameter which is updated to note which
579 registers were needed by this expression.
581 ADDR_SIZE is the DWARF address size to use.
583 OPT_PTR and OP_END are the bounds of the DWARF expression.
585 If non-NULL, INITIAL points to an initial value to write to the
586 stack. If NULL, no initial value is written.
588 PER_CU is the per-CU object used for looking up various other
592 do_compile_dwarf_expr_to_c (int indent
, string_file
*stream
,
593 const char *type_name
,
594 const char *result_name
,
595 struct symbol
*sym
, CORE_ADDR pc
,
596 struct gdbarch
*arch
,
597 std::vector
<bool> ®isters_used
,
598 unsigned int addr_size
,
599 const gdb_byte
*op_ptr
, const gdb_byte
*op_end
,
601 dwarf2_per_cu_data
*per_cu
,
602 dwarf2_per_objfile
*per_objfile
)
604 /* We keep a counter so that labels and other objects we create have
606 static unsigned int scope
;
608 enum bfd_endian byte_order
= gdbarch_byte_order (arch
);
609 const gdb_byte
* const base
= op_ptr
;
610 int need_tempvar
= 0;
612 std::vector
<struct insn_info
> info
;
617 fprintf_filtered (stream
, "%*s__attribute__ ((unused)) %s %s;\n",
618 indent
, "", type_name
, result_name
);
619 fprintf_filtered (stream
, "%*s{\n", indent
, "");
622 stack_depth
= compute_stack_depth (byte_order
, addr_size
,
623 &need_tempvar
, &is_tls
,
624 op_ptr
, op_end
, initial
!= NULL
,
627 /* This is a hack until we can add a feature to glibc to let us
628 properly generate code for TLS. You might think we could emit
629 the address in the ordinary course of translating
630 DW_OP_GNU_push_tls_address, but since the operand appears on the
631 stack, it is relatively hard to find, and the idea of calling
632 target_translate_tls_address with OFFSET==0 and then adding the
633 offset by hand seemed too hackish. */
636 struct frame_info
*frame
= get_selected_frame (NULL
);
640 error (_("Symbol \"%s\" cannot be used because "
641 "there is no selected frame"),
644 val
= read_var_value (sym
, NULL
, frame
);
645 if (VALUE_LVAL (val
) != lval_memory
)
646 error (_("Symbol \"%s\" cannot be used for compilation evaluation "
647 "as its address has not been found."),
650 warning (_("Symbol \"%s\" is thread-local and currently can only "
651 "be referenced from the current thread in "
655 fprintf_filtered (stream
, "%*s%s = %s;\n",
656 indent
, "", result_name
,
657 core_addr_to_string (value_address (val
)));
658 fprintf_filtered (stream
, "%*s}\n", indent
- 2, "");
662 fprintf_filtered (stream
, "%*s" GCC_UINTPTR
" __gdb_stack[%d];\n",
663 indent
, "", stack_depth
);
666 fprintf_filtered (stream
, "%*s" GCC_UINTPTR
" __gdb_tmp;\n", indent
, "");
667 fprintf_filtered (stream
, "%*sint __gdb_tos = -1;\n", indent
, "");
670 pushf (indent
, stream
, "%s", core_addr_to_string (*initial
));
672 while (op_ptr
< op_end
)
674 enum dwarf_location_atom op
= (enum dwarf_location_atom
) *op_ptr
;
675 uint64_t uoffset
, reg
;
678 stream
->printf ("%*s", indent
- 2, "");
679 if (info
[op_ptr
- base
].label
)
681 print_label (stream
, scope
, op_ptr
- base
);
684 stream
->printf ("/* %s */\n", get_DW_OP_name (op
));
686 /* This is handy for debugging the generated code:
687 fprintf_filtered (stream, "if (__gdb_tos != %d) abort ();\n",
688 (int) info[op_ptr - base].depth - 1);
727 push (indent
, stream
, op
- DW_OP_lit0
);
731 uoffset
= extract_unsigned_integer (op_ptr
, addr_size
, byte_order
);
733 /* Some versions of GCC emit DW_OP_addr before
734 DW_OP_GNU_push_tls_address. In this case the value is an
735 index, not an address. We don't support things like
736 branching between the address and the TLS op. */
737 if (op_ptr
>= op_end
|| *op_ptr
!= DW_OP_GNU_push_tls_address
)
738 uoffset
+= per_objfile
->objfile
->text_section_offset ();
739 push (indent
, stream
, uoffset
);
743 push (indent
, stream
,
744 extract_unsigned_integer (op_ptr
, 1, byte_order
));
748 push (indent
, stream
,
749 extract_signed_integer (op_ptr
, 1, byte_order
));
753 push (indent
, stream
,
754 extract_unsigned_integer (op_ptr
, 2, byte_order
));
758 push (indent
, stream
,
759 extract_signed_integer (op_ptr
, 2, byte_order
));
763 push (indent
, stream
,
764 extract_unsigned_integer (op_ptr
, 4, byte_order
));
768 push (indent
, stream
,
769 extract_signed_integer (op_ptr
, 4, byte_order
));
773 push (indent
, stream
,
774 extract_unsigned_integer (op_ptr
, 8, byte_order
));
778 push (indent
, stream
,
779 extract_signed_integer (op_ptr
, 8, byte_order
));
783 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, &uoffset
);
784 push (indent
, stream
, uoffset
);
787 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
788 push (indent
, stream
, offset
);
823 dwarf_expr_require_composition (op_ptr
, op_end
, "DW_OP_regx");
824 pushf_register_address (indent
, stream
, registers_used
, arch
,
825 dwarf_reg_to_regnum_or_error
826 (arch
, op
- DW_OP_reg0
));
830 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, ®
);
831 dwarf_expr_require_composition (op_ptr
, op_end
, "DW_OP_regx");
832 pushf_register_address (indent
, stream
, registers_used
, arch
,
833 dwarf_reg_to_regnum_or_error (arch
, reg
));
868 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
869 pushf_register (indent
, stream
, registers_used
, arch
,
870 dwarf_reg_to_regnum_or_error (arch
,
876 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, ®
);
877 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
878 pushf_register (indent
, stream
, registers_used
, arch
,
879 dwarf_reg_to_regnum_or_error (arch
, reg
), offset
);
884 const gdb_byte
*datastart
;
886 const struct block
*b
;
887 struct symbol
*framefunc
;
890 b
= block_for_pc (pc
);
893 error (_("No block found for address"));
895 framefunc
= block_linkage_function (b
);
898 error (_("No function found for block"));
900 func_get_frame_base_dwarf_block (framefunc
, pc
,
901 &datastart
, &datalen
);
903 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
905 /* Generate a unique-enough name, in case the frame base
906 is computed multiple times in this expression. */
907 xsnprintf (fb_name
, sizeof (fb_name
), "__frame_base_%ld",
908 (long) (op_ptr
- base
));
910 do_compile_dwarf_expr_to_c (indent
, stream
,
911 GCC_UINTPTR
, fb_name
,
913 arch
, registers_used
, addr_size
,
914 datastart
, datastart
+ datalen
,
915 NULL
, per_cu
, per_objfile
);
917 pushf (indent
, stream
, "%s + %s", fb_name
, hex_string (offset
));
922 pushf (indent
, stream
, "__gdb_stack[__gdb_tos]");
926 fprintf_filtered (stream
, "%*s--__gdb_tos;\n", indent
, "");
931 pushf (indent
, stream
, "__gdb_stack[__gdb_tos - %s]",
936 fprintf_filtered (stream
,
937 "%*s__gdb_tmp = __gdb_stack[__gdb_tos - 1];\n",
939 fprintf_filtered (stream
,
940 "%*s__gdb_stack[__gdb_tos - 1] = "
941 "__gdb_stack[__gdb_tos];\n",
943 fprintf_filtered (stream
, ("%*s__gdb_stack[__gdb_tos] = "
949 pushf (indent
, stream
, "__gdb_stack[__gdb_tos - 1]");
953 fprintf_filtered (stream
, ("%*s__gdb_tmp = "
954 "__gdb_stack[__gdb_tos];\n"),
956 fprintf_filtered (stream
,
957 "%*s__gdb_stack[__gdb_tos] = "
958 "__gdb_stack[__gdb_tos - 1];\n",
960 fprintf_filtered (stream
,
961 "%*s__gdb_stack[__gdb_tos - 1] = "
962 "__gdb_stack[__gdb_tos -2];\n",
964 fprintf_filtered (stream
, "%*s__gdb_stack[__gdb_tos - 2] = "
970 case DW_OP_deref_size
:
975 if (op
== DW_OP_deref_size
)
980 mode
= c_get_mode_for_size (size
);
982 error (_("Unsupported size %d in %s"),
983 size
, get_DW_OP_name (op
));
985 /* Cast to a pointer of the desired type, then
987 fprintf_filtered (stream
,
988 "%*s__gdb_stack[__gdb_tos] = "
989 "*((__gdb_int_%s *) "
990 "__gdb_stack[__gdb_tos]);\n",
996 unary (indent
, stream
,
997 "((" GCC_INTPTR
") __gdb_stack[__gdb_tos]) < 0 ? "
998 "-__gdb_stack[__gdb_tos] : __gdb_stack[__gdb_tos]");
1002 unary (indent
, stream
, "-__gdb_stack[__gdb_tos]");
1006 unary (indent
, stream
, "~__gdb_stack[__gdb_tos]");
1009 case DW_OP_plus_uconst
:
1010 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, ®
);
1011 unary (indent
, stream
, "__gdb_stack[__gdb_tos] + %s",
1016 binary (indent
, stream
, ("((" GCC_INTPTR
1017 ") __gdb_stack[__gdb_tos-1]) / (("
1018 GCC_INTPTR
") __gdb_stack[__gdb_tos])"));
1022 binary (indent
, stream
,
1023 "((" GCC_INTPTR
") __gdb_stack[__gdb_tos-1]) >> "
1024 "__gdb_stack[__gdb_tos]");
1027 #define BINARY(OP) \
1028 binary (indent, stream, "%s", "__gdb_stack[__gdb_tos-1] " #OP \
1029 " __gdb_stack[__gdb_tos]"); \
1052 #define COMPARE(OP) \
1053 binary (indent, stream, \
1054 "(((" GCC_INTPTR ") __gdb_stack[__gdb_tos-1]) " #OP \
1056 ") __gdb_stack[__gdb_tos]))"); \
1073 case DW_OP_call_frame_cfa
:
1076 CORE_ADDR text_offset
;
1078 const gdb_byte
*cfa_start
, *cfa_end
;
1080 if (dwarf2_fetch_cfa_info (arch
, pc
, per_cu
,
1082 &text_offset
, &cfa_start
, &cfa_end
))
1085 pushf_register (indent
, stream
, registers_used
, arch
, regnum
,
1090 /* Another expression. */
1093 /* Generate a unique-enough name, in case the CFA is
1094 computed multiple times in this expression. */
1095 xsnprintf (cfa_name
, sizeof (cfa_name
),
1096 "__cfa_%ld", (long) (op_ptr
- base
));
1098 do_compile_dwarf_expr_to_c (indent
, stream
,
1099 GCC_UINTPTR
, cfa_name
,
1100 sym
, pc
, arch
, registers_used
,
1103 &text_offset
, per_cu
, per_objfile
);
1104 pushf (indent
, stream
, "%s", cfa_name
);
1111 offset
= extract_signed_integer (op_ptr
, 2, byte_order
);
1113 fprintf_filtered (stream
, "%*sgoto ", indent
, "");
1114 print_label (stream
, scope
, op_ptr
+ offset
- base
);
1115 stream
->puts (";\n");
1119 offset
= extract_signed_integer (op_ptr
, 2, byte_order
);
1121 fprintf_filtered (stream
,
1122 "%*sif ((( " GCC_INTPTR
1123 ") __gdb_stack[__gdb_tos--]) != 0) goto ",
1125 print_label (stream
, scope
, op_ptr
+ offset
- base
);
1126 stream
->puts (";\n");
1133 error (_("unhandled DWARF op: %s"), get_DW_OP_name (op
));
1137 fprintf_filtered (stream
, "%*s%s = __gdb_stack[__gdb_tos];\n",
1138 indent
, "", result_name
);
1139 fprintf_filtered (stream
, "%*s}\n", indent
- 2, "");
1142 /* See compile.h. */
1145 compile_dwarf_expr_to_c (string_file
*stream
, const char *result_name
,
1146 struct symbol
*sym
, CORE_ADDR pc
,
1147 struct gdbarch
*arch
,
1148 std::vector
<bool> ®isters_used
,
1149 unsigned int addr_size
,
1150 const gdb_byte
*op_ptr
, const gdb_byte
*op_end
,
1151 dwarf2_per_cu_data
*per_cu
,
1152 dwarf2_per_objfile
*per_objfile
)
1154 do_compile_dwarf_expr_to_c (2, stream
, GCC_UINTPTR
, result_name
, sym
, pc
,
1155 arch
, registers_used
, addr_size
, op_ptr
, op_end
,
1156 NULL
, per_cu
, per_objfile
);
1159 /* See compile.h. */
1162 compile_dwarf_bounds_to_c (string_file
*stream
,
1163 const char *result_name
,
1164 const struct dynamic_prop
*prop
,
1165 struct symbol
*sym
, CORE_ADDR pc
,
1166 struct gdbarch
*arch
,
1167 std::vector
<bool> ®isters_used
,
1168 unsigned int addr_size
,
1169 const gdb_byte
*op_ptr
, const gdb_byte
*op_end
,
1170 dwarf2_per_cu_data
*per_cu
,
1171 dwarf2_per_objfile
*per_objfile
)
1173 do_compile_dwarf_expr_to_c (2, stream
, "unsigned long ", result_name
,
1174 sym
, pc
, arch
, registers_used
,
1175 addr_size
, op_ptr
, op_end
, NULL
, per_cu
,