Review request: generate DWARF pubnames under a compiler option
Robinson, Paul
Paul.Robinson at am.sony.com
Wed Jan 30 10:27:41 PST 2013
> From: Krzysztof Parzyszek
> I'm creating testcases for the pubnames generation, and I have a couple
> of questions (about what is expected).
>
> For this C code:
>
> --- x.c ---
> int global_variable;
> static int static_global_variable;
>
> static int static_global_function() {
> return static_global_variable;
> }
>
> int global_function() {
> static int static_local_variable = 1;
> static_local_variable++;
> return global_variable +
> static_global_function() +
> static_local_variable;
> }
> -----------
>
> I get 3 names in the pubnames section (no "static_global_variable" and
> no "static_local_variable"). Is this correct?
>
> .Lpubnames_begin0:
> .half 2
> .word .L.debug_info_begin0
> .set .Lset1, .L.debug_info_end0-.L.debug_info_begin0
> .word .Lset1
> .word 77
> .string "global_variable"
> .word 37
> .string "global_function"
> .word 112
> .string "static_global_function"
> .word 0
> .Lpubnames_end0:
>
>
> -Krzysztof
The DWARF spec says .debug_pubnames and .debug_pubtypes have
names of "global objects and functions" and "global types"
respectively. While this is somewhat open to interpretation,
I wouldn't consider static names to be global.
--paulr
More information about the llvm-commits
mailing list