This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [FYI] Inlining support, rough patch
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 25 Jul 2008 16:54:10 +0300
- Subject: Re: [FYI] Inlining support, rough patch
- References: <20080613152754.GA4220@caradoc.them.org> <20080715192020.GB3094@caradoc.them.org>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Tue, 15 Jul 2008 15:20:20 -0400
> From: Daniel Jacobowitz <drow@false.org>
>
> Eli, when you have a chance, could you look at the NEWS / gdb.texinfo
> changes? I've added a new section, though it is somewhat sparse at
> present.
Yes, it would be good to populate it with additional information about
debugging optimized code.
> +There are some ways that @value{GDBN} cannot pretend that inlined
> +function calls are the same as normal calls:
> +
> +@itemize @bullet
> +@item
> +You cannot set breakpoints on inlined functions. @value{GDBN}
> +either reports that there is no symbol with that name, or else sets the
> +breakpoint on the non-inlined copy of the function.
> +
> +@item
> +Setting breakpoints at the call site of an inlined function may not
> +work, because the call site does not contain any code. @value{GDBN}
> +may incorrectly move the breakpoint to the next line of the enclosing
> +function, after the call.
> +
> +@item
> +@value{GDBN} cannot locate the return value of inlined calls after
> +using the @code{finish} command.
> +
> +@end itemize
This is IMO too negative: you state several problems and never hint on
how to work around them. Please consider suggesting such workarounds
in each one of the above 3 situations. Using breakpoints and returned
values reported by `finish' are two very fundamental debugging
techniques; telling the readers that they are simply unavailable will
lead them to believe debugging code that uses inlined functions is
next to impossible.
Otherwise, this part is okay. Thanks.
> Index: src/gdb/NEWS
> ===================================================================
> --- src.orig/gdb/NEWS 2008-07-15 15:15:22.000000000 -0400
> +++ src/gdb/NEWS 2008-07-15 15:16:05.000000000 -0400
> @@ -17,6 +17,9 @@ For instance, consider:
> If the user types TAB at the end of this command line, the available
> completions will be "f1" and "f2".
>
> +* Inlined functions are now supported. They show up in backtraces, and
> +the "step", "next", and "finish" commands handle them automatically.
> +
This is fine.