This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] LONGEST and ULONGEST function template instantiation
On 06/15/2017 12:59 PM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
>
> Hi Pedro,
> I pick up your patch, and update the ChangeLog entry.
Thanks. FAOD, fine with me to push it in.
>> The version below has no impact on code size:
>>
>> $ size gdb.before gdb.after
>> text data bss dec hex filename
>> 7535236 125008 181184 7841428 77a694 gdb.before
>> 7535236 125008 181184 7841428 77a694 gdb.after
>
> I can't reproduce your result with gcc 5.4.0 on Ubuntu 16.04. The
> patched GDB size increased by 112, but it doesn't matter.
>
> before:
> $ size ./gdb
> text data bss dec hex filename
> 7733505 144208 180768 8058481 7af671 ./gdb
>
> after:
> $ size ./gdb
> text data bss dec hex filename
> 7733617 144208 180768 8058593 7af6e1 ./gdb
Curious, I see the same too now. Dunno what I did
before.
Diffing "size -A" (and stripping addr column) shows:
-gdb.before.stripped :
+gdb.after.stripped :
.rela.plt 16344
.init 26
.plt 10912
-.text 4239945
+.text 4239705
.fini 9
-.rodata 2280312
+.rodata 2280728
.stapsdt.base 1
-.eh_frame_hdr 126004
-.eh_frame 745124
+.eh_frame_hdr 125996
+.eh_frame 745084
So it results in less code after all. The increase is
in .rodata. Maybe the result of longer mangled names or
longer strings for __FUNCTION__.
Thanks,
Pedro Alves