public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [Patch][gdb] Initialise quiet flag for "info functions"
@ 2018-11-02 11:32 Matthew Malcomson
  2018-11-02 13:31 ` Philippe Waroquiers
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Malcomson @ 2018-11-02 11:32 UTC (permalink / raw)
  To: gdb-patches, palves; +Cc: nd

[-- Attachment #1: Type: text/plain, Size: 981 bytes --]

With this flag unset, using 'info functions' without a set quiet flag
was not deterministic and was causing some flaky test failures.

Failures seen in (at least).
gdb.base/info_qt.exp
gdb.dwarf2/dw2-case-insensitive.exp
gdb.base/info-fun.exp

Ok for trunk?
I don't have commit rights.

gdb/ChangeLog:

2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>

	* symtab.c (info_functions_command): Initialise quiet flag.



###############     Attachment also inlined for ease of reply    ###############


diff --git a/gdb/symtab.c b/gdb/symtab.c
index cd27a75e8ca2370a9d11ae6057d051ca6ce13f90..7649908d9c9341ad695626e0a22a085f2af302ef 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -4760,7 +4760,7 @@ info_functions_command (const char *args, int from_tty)
 {
   std::string regexp;
   std::string t_regexp;
-  bool quiet;
+  bool quiet = false;
 
   while (args != NULL
 	 && extract_info_print_args (&args, &quiet, &regexp, &t_regexp))


[-- Attachment #2: initialise-quiet.patch --]
[-- Type: text/plain, Size: 435 bytes --]

diff --git a/gdb/symtab.c b/gdb/symtab.c
index cd27a75e8ca2370a9d11ae6057d051ca6ce13f90..7649908d9c9341ad695626e0a22a085f2af302ef 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -4760,7 +4760,7 @@ info_functions_command (const char *args, int from_tty)
 {
   std::string regexp;
   std::string t_regexp;
-  bool quiet;
+  bool quiet = false;
 
   while (args != NULL
 	 && extract_info_print_args (&args, &quiet, &regexp, &t_regexp))


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch][gdb] Initialise quiet flag for "info functions"
  2018-11-02 11:32 [Patch][gdb] Initialise quiet flag for "info functions" Matthew Malcomson
@ 2018-11-02 13:31 ` Philippe Waroquiers
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Waroquiers @ 2018-11-02 13:31 UTC (permalink / raw)
  To: Matthew Malcomson, gdb-patches, palves; +Cc: nd

Thanks for the analysis and fix,
I have pushed the below fix as obvious (and an equivalent fix in stack.c)
as d54cfd762b06.

Philippe

On Fri, 2018-11-02 at 11:30 +0000, Matthew Malcomson wrote:
> With this flag unset, using 'info functions' without a set quiet flag
> was not deterministic and was causing some flaky test failures.
> 
> Failures seen in (at least).
> gdb.base/info_qt.exp
> gdb.dwarf2/dw2-case-insensitive.exp
> gdb.base/info-fun.exp
> 
> Ok for trunk?
> I don't have commit rights.
> 
> gdb/ChangeLog:
> 
> 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
> 
> 	* symtab.c (info_functions_command): Initialise quiet flag.
> 
> 
> 
> ###############     Attachment also inlined for ease of reply    ###############
> 
> 
> diff --git a/gdb/symtab.c b/gdb/symtab.c
> index cd27a75e8ca2370a9d11ae6057d051ca6ce13f90..7649908d9c9341ad695626e0a22a085f2af302ef 100644
> --- a/gdb/symtab.c
> +++ b/gdb/symtab.c
> @@ -4760,7 +4760,7 @@ info_functions_command (const char *args, int from_tty)
>  {
>    std::string regexp;
>    std::string t_regexp;
> -  bool quiet;
> +  bool quiet = false;
>  
>    while (args != NULL
>  	 && extract_info_print_args (&args, &quiet, &regexp, &t_regexp))
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-02 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02 11:32 [Patch][gdb] Initialise quiet flag for "info functions" Matthew Malcomson
2018-11-02 13:31 ` Philippe Waroquiers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).