* Completion on static functions
@ 2013-04-07 16:29 Eli Zaretskii
2013-04-07 16:50 ` Eli Zaretskii
[not found] ` <83li8o9sph.fsf@gnu.org>
0 siblings, 2 replies; 7+ messages in thread
From: Eli Zaretskii @ 2013-04-07 16:29 UTC (permalink / raw)
To: gdb
Sometimes "break foo TAB" does not complete the name of a function,
even though typing its full name as in "break foo_bar RET" sets a
breakpoint without any complaints. It happens with static functions,
but with all of them. Perhaps only inlined functions?
I see this both in 7.5.1 and in 7.5.91, on MS-Windows, with programs
compiled with MinGW GCC 4.7.2.
Does anyone else see this? Can this annoyance be fixed somehow?
TIA
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Completion on static functions
2013-04-07 16:29 Completion on static functions Eli Zaretskii
@ 2013-04-07 16:50 ` Eli Zaretskii
[not found] ` <83li8o9sph.fsf@gnu.org>
1 sibling, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2013-04-07 16:50 UTC (permalink / raw)
To: gdb
> Date: Sun, 07 Apr 2013 19:28:16 +0300
> From: Eli Zaretskii <eliz@gnu.org>
>
> Sometimes "break foo TAB" does not complete the name of a function,
> even though typing its full name as in "break foo_bar RET" sets a
> breakpoint without any complaints. It happens with static functions,
> but with all of them. Perhaps only inlined functions?
^^^^^^^^^^^^^^^^^^^^
"but NOT with all of them", of course.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Completion on static functions
[not found] ` <83li8o9sph.fsf@gnu.org>
@ 2013-04-12 6:47 ` Jan Kratochvil
2013-04-12 7:01 ` Markus Teich
2013-04-12 8:13 ` Eli Zaretskii
0 siblings, 2 replies; 7+ messages in thread
From: Jan Kratochvil @ 2013-04-12 6:47 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb
On Fri, 12 Apr 2013 08:19:22 +0200, Eli Zaretskii wrote:
> So does this silence mean that no one else bumped into this yet?
Maybe nobody has noticed, primarily there is no reproducer above.
Regards,
Jan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Completion on static functions
2013-04-12 6:47 ` Jan Kratochvil
@ 2013-04-12 7:01 ` Markus Teich
2013-04-12 8:13 ` Eli Zaretskii
1 sibling, 0 replies; 7+ messages in thread
From: Markus Teich @ 2013-04-12 7:01 UTC (permalink / raw)
To: gdb
You could try creating a variable object out of the functionname.
As far as i can tell, that (only?) fails, if the function is inlined.
--Markus
Am 12.04.2013 08:47, schrieb Jan Kratochvil:
> On Fri, 12 Apr 2013 08:19:22 +0200, Eli Zaretskii wrote:
>> So does this silence mean that no one else bumped into this yet?
>
> Maybe nobody has noticed, primarily there is no reproducer above.
>
>
> Regards,
> Jan
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Completion on static functions
2013-04-12 6:47 ` Jan Kratochvil
2013-04-12 7:01 ` Markus Teich
@ 2013-04-12 8:13 ` Eli Zaretskii
2013-04-12 8:20 ` Markus Teich
1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2013-04-12 8:13 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb
> Date: Fri, 12 Apr 2013 08:47:49 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: gdb@sourceware.org
>
> On Fri, 12 Apr 2013 08:19:22 +0200, Eli Zaretskii wrote:
> > So does this silence mean that no one else bumped into this yet?
>
> there is no reproducer above.
Sorry about that. I didn't imagine the problem was so rare. My bad.
Try this: build the latest sharutils 4.13.4 with CFLAGS='-g3 -O2',
then do this:
$ cd src && gdb ./shar
(gdb) break generate_full_ TAB
(There is a static function named generate_full_header in shar.c.)
As mentioned before, the problem happened to me with GCC 4.7.2 on
MinGW. As expected, GDB reports (in "info source") that the debug
info is DWARF 2 with preprocessor macro info.
Let me know if you need more info from GDB, I have the build directory
handy with the object and executable files that trigger this problem.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Completion on static functions
2013-04-12 8:13 ` Eli Zaretskii
@ 2013-04-12 8:20 ` Markus Teich
2013-04-12 9:29 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Markus Teich @ 2013-04-12 8:20 UTC (permalink / raw)
To: gdb
Try compiling with -O0 to see if these functions indeed get inlined.
--Markus
Am 12.04.2013 10:12, schrieb Eli Zaretskii:
>> Date: Fri, 12 Apr 2013 08:47:49 +0200
>> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>> Cc: gdb@sourceware.org
>>
>> On Fri, 12 Apr 2013 08:19:22 +0200, Eli Zaretskii wrote:
>>> So does this silence mean that no one else bumped into this yet?
>>
>> there is no reproducer above.
>
> Sorry about that. I didn't imagine the problem was so rare. My bad.
>
> Try this: build the latest sharutils 4.13.4 with CFLAGS='-g3 -O2',
> then do this:
>
> $ cd src && gdb ./shar
> (gdb) break generate_full_ TAB
>
> (There is a static function named generate_full_header in shar.c.)
>
> As mentioned before, the problem happened to me with GCC 4.7.2 on
> MinGW. As expected, GDB reports (in "info source") that the debug
> info is DWARF 2 with preprocessor macro info.
>
> Let me know if you need more info from GDB, I have the build directory
> handy with the object and executable files that trigger this problem.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Completion on static functions
2013-04-12 8:20 ` Markus Teich
@ 2013-04-12 9:29 ` Eli Zaretskii
0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2013-04-12 9:29 UTC (permalink / raw)
To: Markus Teich; +Cc: gdb
> Date: Fri, 12 Apr 2013 10:20:50 +0200
> From: Markus Teich <markus.teich@stusta.mhn.de>
>
> Try compiling with -O0 to see if these functions indeed get inlined.
No need to recompile:
(gdb) info address print_header_stamp
Symbol "print_header_stamp" is a function at address 0x401cec.
(gdb) info address main
Symbol "main" is a function at address 0x427b10.
But:
(gdb) info address generate_full_header
No symbol "generate_full_header" in current context.
And if I disassemble the code, I don't see any call instructions for
that function (nor even its caller, configure_shar, and its caller's
caller, initialize).
So I think it's quite clear that this function is inlined, as are many
others in that program.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-04-12 9:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-07 16:29 Completion on static functions Eli Zaretskii
2013-04-07 16:50 ` Eli Zaretskii
[not found] ` <83li8o9sph.fsf@gnu.org>
2013-04-12 6:47 ` Jan Kratochvil
2013-04-12 7:01 ` Markus Teich
2013-04-12 8:13 ` Eli Zaretskii
2013-04-12 8:20 ` Markus Teich
2013-04-12 9:29 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox