[LLVMbugs] [Bug 21823] New: 'nodebug' doesn't suppress variable info
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Dec 10 12:59:00 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=21823
Bug ID: 21823
Summary: 'nodebug' doesn't suppress variable info
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: paul_robinson at playstation.sony.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The 'nodebug' attribute can be attached to a function or static/global
variable. On a function, it will suppress the debug info for that function.
When attached to a variable, however, debug info for the variable still
appears.
---- test.cpp ----
int __attribute__((nodebug)) i1 = 2;
---- script ----
clang -c -g test.cpp
llvm-dwarfdump -debug-dump=info test.o
---- output ----
nodebug.o: file format ELF64-x86-64
.debug_info contents:
0x00000000: Compile Unit: length = 0x00000037 version = 0x0004 abbr_offset =
0x0000 addr_size = 0x08 (next unit at 0x0000003b)
0x0000000b: DW_TAG_compile_unit [1] *
DW_AT_producer [DW_FORM_strp] ( .debug_str[0x00000000] =
"clang version 3.6.0 (trunk 223919)")
DW_AT_language [DW_FORM_data2] (DW_LANG_C_plus_plus)
DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000023] =
"nodebug.cpp")
DW_AT_stmt_list [DW_FORM_sec_offset] (0x00000000)
DW_AT_comp_dir [DW_FORM_strp] ( .debug_str[0x0000002f] =
"/home/probinson/projects/scratch")
0x0000001e: DW_TAG_variable [2]
DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000050] = "i1")
DW_AT_type [DW_FORM_ref4] (cu + 0x0033 => {0x00000033})
DW_AT_external [DW_FORM_flag_present] (true)
DW_AT_decl_file [DW_FORM_data1]
("/home/probinson/projects/scratch/nodebug.cpp")
DW_AT_decl_line [DW_FORM_data1] (2)
DW_AT_location [DW_FORM_exprloc] (<0x9> 03 00 00 00 00 00 00
00 00 )
0x00000033: DW_TAG_base_type [3]
DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000053] = "int")
DW_AT_encoding [DW_FORM_data1] (DW_ATE_signed)
DW_AT_byte_size [DW_FORM_data1] (0x04)
0x0000003a: NULL
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141210/f7c5b993/attachment.html>
More information about the llvm-bugs
mailing list