1 /* Convert a DWARF location expression to C
3 Copyright (C) 2014-2024 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/>. */
22 #include "dwarf2/expr.h"
23 #include "dwarf2/loc.h"
24 #include "dwarf2/read.h"
27 #include "compile-internal.h"
28 #include "compile-c.h"
31 #include "dwarf2/frame.h"
32 #include "gdbsupport/gdb_vecs.h"
38 /* Information about a given instruction. */
42 /* Stack depth at entry. */
46 /* Whether this instruction has been visited. */
48 unsigned int visited
: 1;
50 /* Whether this instruction needs a label. */
52 unsigned int label
: 1;
54 /* Whether this instruction is DW_OP_GNU_push_tls_address or
55 DW_OP_form_tls_address. This is a hack until we can add a
56 feature to glibc to let us properly generate code for TLS. */
58 unsigned int is_tls
: 1;
61 /* A helper function for compute_stack_depth that does the work. This
62 examines the DWARF expression starting from START and computes
65 NEED_TEMPVAR is an out parameter which is set if this expression
66 needs a special temporary variable to be emitted (see the code
68 INFO is a vector of insn_info objects, indexed by offset from the
69 start of the DWARF expression.
70 TO_DO is a list of bytecodes which must be examined; it may be
71 added to by this function.
72 BYTE_ORDER and ADDR_SIZE describe this bytecode in the obvious way.
73 OP_PTR and OP_END are the bounds of the DWARF expression. */
76 compute_stack_depth_worker (int start
, int *need_tempvar
,
77 std::vector
<struct insn_info
> *info
,
78 std::vector
<int> *to_do
,
79 enum bfd_endian byte_order
, unsigned int addr_size
,
80 const gdb_byte
*op_ptr
, const gdb_byte
*op_end
)
82 const gdb_byte
* const base
= op_ptr
;
86 gdb_assert ((*info
)[start
].visited
);
87 stack_depth
= (*info
)[start
].depth
;
89 while (op_ptr
< op_end
)
91 enum dwarf_location_atom op
= (enum dwarf_location_atom
) *op_ptr
;
94 int ndx
= op_ptr
- base
;
96 #define SET_CHECK_DEPTH(WHERE) \
97 if ((*info)[WHERE].visited) \
99 if ((*info)[WHERE].depth != stack_depth) \
100 error (_("inconsistent stack depths")); \
104 /* Stack depth not set, so set it. */ \
105 (*info)[WHERE].visited = 1; \
106 (*info)[WHERE].depth = stack_depth; \
109 SET_CHECK_DEPTH (ndx
);
177 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
217 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, ®
);
253 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
258 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, ®
);
259 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
264 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
296 case DW_OP_deref_size
:
300 case DW_OP_plus_uconst
:
301 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, ®
);
324 case DW_OP_call_frame_cfa
:
328 case DW_OP_GNU_push_tls_address
:
329 case DW_OP_form_tls_address
:
330 (*info
)[ndx
].is_tls
= 1;
334 offset
= extract_signed_integer (op_ptr
, 2, byte_order
);
336 offset
= op_ptr
+ offset
- base
;
337 /* If the destination has not been seen yet, add it to the
339 if (!(*info
)[offset
].visited
)
340 to_do
->push_back (offset
);
341 SET_CHECK_DEPTH (offset
);
342 (*info
)[offset
].label
= 1;
343 /* We're done with this line of code. */
347 offset
= extract_signed_integer (op_ptr
, 2, byte_order
);
349 offset
= op_ptr
+ offset
- base
;
351 /* If the destination has not been seen yet, add it to the
353 if (!(*info
)[offset
].visited
)
354 to_do
->push_back (offset
);
355 SET_CHECK_DEPTH (offset
);
356 (*info
)[offset
].label
= 1;
363 error (_("unhandled DWARF op: %s"), get_DW_OP_name (op
));
367 gdb_assert (op_ptr
== op_end
);
369 #undef SET_CHECK_DEPTH
372 /* Compute the maximum needed stack depth of a DWARF expression, and
373 some other information as well.
375 BYTE_ORDER and ADDR_SIZE describe this bytecode in the obvious way.
376 NEED_TEMPVAR is an out parameter which is set if this expression
377 needs a special temporary variable to be emitted (see the code
379 IS_TLS is an out parameter which is set if this expression refers
381 OP_PTR and OP_END are the bounds of the DWARF expression.
382 INITIAL_DEPTH is the initial depth of the DWARF expression stack.
383 INFO is an array of insn_info objects, indexed by offset from the
384 start of the DWARF expression.
386 This returns the maximum stack depth. */
389 compute_stack_depth (enum bfd_endian byte_order
, unsigned int addr_size
,
390 int *need_tempvar
, int *is_tls
,
391 const gdb_byte
*op_ptr
, const gdb_byte
*op_end
,
393 std::vector
<struct insn_info
> *info
)
395 std::vector
<int> to_do
;
398 info
->resize (op_end
- op_ptr
);
401 (*info
)[0].depth
= initial_depth
;
402 (*info
)[0].visited
= 1;
404 while (!to_do
.empty ())
406 int ndx
= to_do
.back ();
409 compute_stack_depth_worker (ndx
, need_tempvar
, info
, &to_do
,
410 byte_order
, addr_size
,
416 for (i
= 0; i
< op_end
- op_ptr
; ++i
)
418 if ((*info
)[i
].depth
> stack_depth
)
419 stack_depth
= (*info
)[i
].depth
;
420 if ((*info
)[i
].is_tls
)
424 return stack_depth
+ 1;
429 #define GCC_UINTPTR "__gdb_uintptr"
430 #define GCC_INTPTR "__gdb_intptr"
432 /* Emit code to push a constant. */
435 push (int indent
, string_file
*stream
, ULONGEST l
)
438 "%*s__gdb_stack[++__gdb_tos] = (" GCC_UINTPTR
") %s;\n",
439 indent
, "", hex_string (l
));
442 /* Emit code to push an arbitrary expression. This works like
445 static void pushf (int indent
, string_file
*stream
, const char *format
, ...)
446 ATTRIBUTE_PRINTF (3, 4);
449 pushf (int indent
, string_file
*stream
, const char *format
, ...)
453 gdb_printf (stream
, "%*s__gdb_stack[__gdb_tos + 1] = ", indent
, "");
454 va_start (args
, format
);
455 stream
->vprintf (format
, args
);
457 stream
->puts (";\n");
459 gdb_printf (stream
, "%*s++__gdb_tos;\n", indent
, "");
462 /* Emit code for a unary expression -- one which operates in-place on
463 the top-of-stack. This works like printf. */
465 static void unary (int indent
, string_file
*stream
, const char *format
, ...)
466 ATTRIBUTE_PRINTF (3, 4);
469 unary (int indent
, string_file
*stream
, const char *format
, ...)
473 gdb_printf (stream
, "%*s__gdb_stack[__gdb_tos] = ", indent
, "");
474 va_start (args
, format
);
475 stream
->vprintf (format
, args
);
477 stream
->puts (";\n");
480 /* Emit code for a unary expression -- one which uses the top two
481 stack items, popping the topmost one. This works like printf. */
482 static void binary (int indent
, string_file
*stream
, const char *format
, ...)
483 ATTRIBUTE_PRINTF (3, 4);
486 binary (int indent
, string_file
*stream
, const char *format
, ...)
490 gdb_printf (stream
, "%*s__gdb_stack[__gdb_tos - 1] = ", indent
, "");
491 va_start (args
, format
);
492 stream
->vprintf (format
, args
);
494 stream
->puts (";\n");
495 gdb_printf (stream
, "%*s--__gdb_tos;\n", indent
, "");
498 /* Print the name of a label given its "SCOPE", an arbitrary integer
499 used for uniqueness, and its TARGET, the bytecode offset
500 corresponding to the label's point of definition. */
503 print_label (string_file
*stream
, unsigned int scope
, int target
)
505 stream
->printf ("__label_%u_%s", scope
, pulongest (target
));
508 /* Note that a register was used. */
511 note_register (int regnum
, std::vector
<bool> ®isters_used
)
513 gdb_assert (regnum
>= 0);
514 /* If the expression uses a cooked register, then we currently can't
515 compile it. We would need a gdbarch method to handle this
517 if (regnum
>= registers_used
.size ())
518 error (_("Expression uses \"cooked\" register and cannot be compiled."));
519 registers_used
[regnum
] = true;
522 /* Emit code that pushes a register's address on the stack.
523 REGISTERS_USED is an out parameter which is updated to note which
524 register was needed by this expression. */
527 pushf_register_address (int indent
, string_file
*stream
,
528 std::vector
<bool> ®isters_used
,
529 struct gdbarch
*gdbarch
, int regnum
)
531 std::string regname
= compile_register_name_mangled (gdbarch
, regnum
);
533 note_register (regnum
, registers_used
);
534 pushf (indent
, stream
,
535 "(" GCC_UINTPTR
") &" COMPILE_I_SIMPLE_REGISTER_ARG_NAME
"->%s",
539 /* Emit code that pushes a register's value on the stack.
540 REGISTERS_USED is an out parameter which is updated to note which
541 register was needed by this expression. OFFSET is added to the
542 register's value before it is pushed. */
545 pushf_register (int indent
, string_file
*stream
,
546 std::vector
<bool> ®isters_used
,
547 struct gdbarch
*gdbarch
, int regnum
, uint64_t offset
)
549 std::string regname
= compile_register_name_mangled (gdbarch
, regnum
);
551 note_register (regnum
, registers_used
);
553 pushf (indent
, stream
, COMPILE_I_SIMPLE_REGISTER_ARG_NAME
"->%s",
556 pushf (indent
, stream
,
557 COMPILE_I_SIMPLE_REGISTER_ARG_NAME
"->%s + (" GCC_UINTPTR
") %s",
558 regname
.c_str (), hex_string (offset
));
561 /* Compile a DWARF expression to C code.
563 INDENT is the indentation level to use.
564 STREAM is the stream where the code should be written.
566 TYPE_NAME names the type of the result of the DWARF expression.
567 For locations this is "void *" but for array bounds it will be an
570 RESULT_NAME is the name of a variable in the resulting C code. The
571 result of the expression will be assigned to this variable.
573 SYM is the symbol corresponding to this expression.
574 PC is the location at which the expression is being evaluated.
575 ARCH is the architecture to use.
577 REGISTERS_USED is an out parameter which is updated to note which
578 registers were needed by this expression.
580 ADDR_SIZE is the DWARF address size to use.
582 OPT_PTR and OP_END are the bounds of the DWARF expression.
584 If non-NULL, INITIAL points to an initial value to write to the
585 stack. If NULL, no initial value is written.
587 PER_CU is the per-CU object used for looking up various other
591 do_compile_dwarf_expr_to_c (int indent
, string_file
*stream
,
592 const char *type_name
,
593 const char *result_name
,
594 struct symbol
*sym
, CORE_ADDR pc
,
595 struct gdbarch
*arch
,
596 std::vector
<bool> ®isters_used
,
597 unsigned int addr_size
,
598 const gdb_byte
*op_ptr
, const gdb_byte
*op_end
,
600 dwarf2_per_cu_data
*per_cu
,
601 dwarf2_per_objfile
*per_objfile
)
603 /* We keep a counter so that labels and other objects we create have
605 static unsigned int scope
;
607 enum bfd_endian byte_order
= gdbarch_byte_order (arch
);
608 const gdb_byte
* const base
= op_ptr
;
609 int need_tempvar
= 0;
611 std::vector
<struct insn_info
> info
;
616 gdb_printf (stream
, "%*s__attribute__ ((unused)) %s %s;\n",
617 indent
, "", type_name
, result_name
);
618 gdb_printf (stream
, "%*s{\n", indent
, "");
621 stack_depth
= compute_stack_depth (byte_order
, addr_size
,
622 &need_tempvar
, &is_tls
,
623 op_ptr
, op_end
, initial
!= NULL
,
626 /* This is a hack until we can add a feature to glibc to let us
627 properly generate code for TLS. You might think we could emit
628 the address in the ordinary course of translating
629 DW_OP_GNU_push_tls_address, but since the operand appears on the
630 stack, it is relatively hard to find, and the idea of calling
631 target_translate_tls_address with OFFSET==0 and then adding the
632 offset by hand seemed too hackish. */
635 frame_info_ptr frame
= get_selected_frame (NULL
);
639 error (_("Symbol \"%s\" cannot be used because "
640 "there is no selected frame"),
643 val
= read_var_value (sym
, NULL
, frame
);
644 if (val
->lval () != lval_memory
)
645 error (_("Symbol \"%s\" cannot be used for compilation evaluation "
646 "as its address has not been found."),
649 warning (_("Symbol \"%s\" is thread-local and currently can only "
650 "be referenced from the current thread in "
654 gdb_printf (stream
, "%*s%s = %s;\n",
655 indent
, "", result_name
,
656 core_addr_to_string (val
->address ()));
657 gdb_printf (stream
, "%*s}\n", indent
- 2, "");
661 gdb_printf (stream
, "%*s" GCC_UINTPTR
" __gdb_stack[%d];\n",
662 indent
, "", stack_depth
);
665 gdb_printf (stream
, "%*s" GCC_UINTPTR
" __gdb_tmp;\n", indent
, "");
666 gdb_printf (stream
, "%*sint __gdb_tos = -1;\n", indent
, "");
669 pushf (indent
, stream
, "%s", core_addr_to_string (*initial
));
671 while (op_ptr
< op_end
)
673 enum dwarf_location_atom op
= (enum dwarf_location_atom
) *op_ptr
;
674 uint64_t uoffset
, reg
;
677 stream
->printf ("%*s", indent
- 2, "");
678 if (info
[op_ptr
- base
].label
)
680 print_label (stream
, scope
, op_ptr
- base
);
683 stream
->printf ("/* %s */\n", get_DW_OP_name (op
));
685 /* This is handy for debugging the generated code:
686 gdb_printf (stream, "if (__gdb_tos != %d) abort ();\n",
687 (int) info[op_ptr - base].depth - 1);
726 push (indent
, stream
, op
- DW_OP_lit0
);
730 uoffset
= extract_unsigned_integer (op_ptr
, addr_size
, byte_order
);
732 /* Some versions of GCC emit DW_OP_addr before
733 DW_OP_GNU_push_tls_address. In this case the value is an
734 index, not an address. We don't support things like
735 branching between the address and the TLS op. */
736 if (op_ptr
>= op_end
|| *op_ptr
!= DW_OP_GNU_push_tls_address
)
737 uoffset
+= per_objfile
->objfile
->text_section_offset ();
738 push (indent
, stream
, uoffset
);
742 push (indent
, stream
,
743 extract_unsigned_integer (op_ptr
, 1, byte_order
));
747 push (indent
, stream
,
748 extract_signed_integer (op_ptr
, 1, byte_order
));
752 push (indent
, stream
,
753 extract_unsigned_integer (op_ptr
, 2, byte_order
));
757 push (indent
, stream
,
758 extract_signed_integer (op_ptr
, 2, byte_order
));
762 push (indent
, stream
,
763 extract_unsigned_integer (op_ptr
, 4, byte_order
));
767 push (indent
, stream
,
768 extract_signed_integer (op_ptr
, 4, byte_order
));
772 push (indent
, stream
,
773 extract_unsigned_integer (op_ptr
, 8, byte_order
));
777 push (indent
, stream
,
778 extract_signed_integer (op_ptr
, 8, byte_order
));
782 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, &uoffset
);
783 push (indent
, stream
, uoffset
);
786 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
787 push (indent
, stream
, offset
);
822 dwarf_expr_require_composition (op_ptr
, op_end
, "DW_OP_regx");
823 pushf_register_address (indent
, stream
, registers_used
, arch
,
824 dwarf_reg_to_regnum_or_error
825 (arch
, op
- DW_OP_reg0
));
829 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, ®
);
830 dwarf_expr_require_composition (op_ptr
, op_end
, "DW_OP_regx");
831 pushf_register_address (indent
, stream
, registers_used
, arch
,
832 dwarf_reg_to_regnum_or_error (arch
, reg
));
867 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
868 pushf_register (indent
, stream
, registers_used
, arch
,
869 dwarf_reg_to_regnum_or_error (arch
,
875 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, ®
);
876 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
877 pushf_register (indent
, stream
, registers_used
, arch
,
878 dwarf_reg_to_regnum_or_error (arch
, reg
), offset
);
883 const gdb_byte
*datastart
;
885 const struct block
*b
;
886 struct symbol
*framefunc
;
889 b
= block_for_pc (pc
);
892 error (_("No block found for address"));
894 framefunc
= b
->linkage_function ();
897 error (_("No function found for block"));
899 func_get_frame_base_dwarf_block (framefunc
, pc
,
900 &datastart
, &datalen
);
902 op_ptr
= safe_read_sleb128 (op_ptr
, op_end
, &offset
);
904 /* Generate a unique-enough name, in case the frame base
905 is computed multiple times in this expression. */
906 xsnprintf (fb_name
, sizeof (fb_name
), "__frame_base_%ld",
907 (long) (op_ptr
- base
));
909 do_compile_dwarf_expr_to_c (indent
, stream
,
910 GCC_UINTPTR
, fb_name
,
912 arch
, registers_used
, addr_size
,
913 datastart
, datastart
+ datalen
,
914 NULL
, per_cu
, per_objfile
);
916 pushf (indent
, stream
, "%s + %s", fb_name
, hex_string (offset
));
921 pushf (indent
, stream
, "__gdb_stack[__gdb_tos]");
925 gdb_printf (stream
, "%*s--__gdb_tos;\n", indent
, "");
930 pushf (indent
, stream
, "__gdb_stack[__gdb_tos - %s]",
936 "%*s__gdb_tmp = __gdb_stack[__gdb_tos - 1];\n",
939 "%*s__gdb_stack[__gdb_tos - 1] = "
940 "__gdb_stack[__gdb_tos];\n",
942 gdb_printf (stream
, ("%*s__gdb_stack[__gdb_tos] = "
948 pushf (indent
, stream
, "__gdb_stack[__gdb_tos - 1]");
952 gdb_printf (stream
, ("%*s__gdb_tmp = "
953 "__gdb_stack[__gdb_tos];\n"),
956 "%*s__gdb_stack[__gdb_tos] = "
957 "__gdb_stack[__gdb_tos - 1];\n",
960 "%*s__gdb_stack[__gdb_tos - 1] = "
961 "__gdb_stack[__gdb_tos -2];\n",
963 gdb_printf (stream
, "%*s__gdb_stack[__gdb_tos - 2] = "
969 case DW_OP_deref_size
:
974 if (op
== DW_OP_deref_size
)
979 mode
= c_get_mode_for_size (size
);
981 error (_("Unsupported size %d in %s"),
982 size
, get_DW_OP_name (op
));
984 /* Cast to a pointer of the desired type, then
987 "%*s__gdb_stack[__gdb_tos] = "
988 "*((__gdb_int_%s *) "
989 "__gdb_stack[__gdb_tos]);\n",
995 unary (indent
, stream
,
996 "((" GCC_INTPTR
") __gdb_stack[__gdb_tos]) < 0 ? "
997 "-__gdb_stack[__gdb_tos] : __gdb_stack[__gdb_tos]");
1001 unary (indent
, stream
, "-__gdb_stack[__gdb_tos]");
1005 unary (indent
, stream
, "~__gdb_stack[__gdb_tos]");
1008 case DW_OP_plus_uconst
:
1009 op_ptr
= safe_read_uleb128 (op_ptr
, op_end
, ®
);
1010 unary (indent
, stream
, "__gdb_stack[__gdb_tos] + %s",
1015 binary (indent
, stream
, ("((" GCC_INTPTR
1016 ") __gdb_stack[__gdb_tos-1]) / (("
1017 GCC_INTPTR
") __gdb_stack[__gdb_tos])"));
1021 binary (indent
, stream
,
1022 "((" GCC_INTPTR
") __gdb_stack[__gdb_tos-1]) >> "
1023 "__gdb_stack[__gdb_tos]");
1026 #define BINARY(OP) \
1027 binary (indent, stream, "%s", "__gdb_stack[__gdb_tos-1] " #OP \
1028 " __gdb_stack[__gdb_tos]"); \
1051 #define COMPARE(OP) \
1052 binary (indent, stream, \
1053 "(((" GCC_INTPTR ") __gdb_stack[__gdb_tos-1]) " #OP \
1055 ") __gdb_stack[__gdb_tos]))"); \
1072 case DW_OP_call_frame_cfa
:
1075 CORE_ADDR text_offset
;
1077 const gdb_byte
*cfa_start
, *cfa_end
;
1079 if (dwarf2_fetch_cfa_info (arch
, pc
, per_cu
,
1081 &text_offset
, &cfa_start
, &cfa_end
))
1084 pushf_register (indent
, stream
, registers_used
, arch
, regnum
,
1089 /* Another expression. */
1092 /* Generate a unique-enough name, in case the CFA is
1093 computed multiple times in this expression. */
1094 xsnprintf (cfa_name
, sizeof (cfa_name
),
1095 "__cfa_%ld", (long) (op_ptr
- base
));
1097 do_compile_dwarf_expr_to_c (indent
, stream
,
1098 GCC_UINTPTR
, cfa_name
,
1099 sym
, pc
, arch
, registers_used
,
1102 &text_offset
, per_cu
, per_objfile
);
1103 pushf (indent
, stream
, "%s", cfa_name
);
1110 offset
= extract_signed_integer (op_ptr
, 2, byte_order
);
1112 gdb_printf (stream
, "%*sgoto ", indent
, "");
1113 print_label (stream
, scope
, op_ptr
+ offset
- base
);
1114 stream
->puts (";\n");
1118 offset
= extract_signed_integer (op_ptr
, 2, byte_order
);
1121 "%*sif ((( " GCC_INTPTR
1122 ") __gdb_stack[__gdb_tos--]) != 0) goto ",
1124 print_label (stream
, scope
, op_ptr
+ offset
- base
);
1125 stream
->puts (";\n");
1132 error (_("unhandled DWARF op: %s"), get_DW_OP_name (op
));
1136 gdb_printf (stream
, "%*s%s = __gdb_stack[__gdb_tos];\n",
1137 indent
, "", result_name
);
1138 gdb_printf (stream
, "%*s}\n", indent
- 2, "");
1141 /* See compile.h. */
1144 compile_dwarf_expr_to_c (string_file
*stream
, const char *result_name
,
1145 struct symbol
*sym
, CORE_ADDR pc
,
1146 struct gdbarch
*arch
,
1147 std::vector
<bool> ®isters_used
,
1148 unsigned int addr_size
,
1149 const gdb_byte
*op_ptr
, const gdb_byte
*op_end
,
1150 dwarf2_per_cu_data
*per_cu
,
1151 dwarf2_per_objfile
*per_objfile
)
1153 do_compile_dwarf_expr_to_c (2, stream
, GCC_UINTPTR
, result_name
, sym
, pc
,
1154 arch
, registers_used
, addr_size
, op_ptr
, op_end
,
1155 NULL
, per_cu
, per_objfile
);
1158 /* See compile.h. */
1161 compile_dwarf_bounds_to_c (string_file
*stream
,
1162 const char *result_name
,
1163 const struct dynamic_prop
*prop
,
1164 struct symbol
*sym
, CORE_ADDR pc
,
1165 struct gdbarch
*arch
,
1166 std::vector
<bool> ®isters_used
,
1167 unsigned int addr_size
,
1168 const gdb_byte
*op_ptr
, const gdb_byte
*op_end
,
1169 dwarf2_per_cu_data
*per_cu
,
1170 dwarf2_per_objfile
*per_objfile
)
1172 do_compile_dwarf_expr_to_c (2, stream
, "unsigned long ", result_name
,
1173 sym
, pc
, arch
, registers_used
,
1174 addr_size
, op_ptr
, op_end
, NULL
, per_cu
,