public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/4] libthread_db initialization changes related to upcoming glibc-2.34
@ 2021-06-10 17:26 Kevin Buettner
  2021-06-10 17:26 ` [PATCH 1/4] " Kevin Buettner
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Kevin Buettner @ 2021-06-10 17:26 UTC (permalink / raw)
  To: gdb-patches

This patch series contains changes necessary for GDB to be able to
debug threaded programs using glibc-2.34.

The actual change to GDB sources are contained in the first patch; the
remainder deal with several testing issues that I ran into.

Kevin Buettner (4):
  libthread_db initialization changes related to upcoming glibc-2.34
  testsuite/glib-2.34: Match/consume optional libthread_db related
    output
  print-symbol-loading.exp: Allow libc symbols to be already loaded
  mi-sym-info.exp: Increase timeout for 114-symbol-info-functions

 gdb/linux-thread-db.c                         | 24 +++++++-
 gdb/solib.c                                   | 10 +++-
 .../gdb.base/execl-update-breakpoints.exp     |  1 +
 .../gdb.base/fork-print-inferior-events.exp   |  3 +-
 .../gdb.base/print-symbol-loading.exp         | 15 ++++-
 gdb/testsuite/gdb.mi/mi-sym-info.exp          | 56 ++++++++++---------
 6 files changed, 73 insertions(+), 36 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [PATCH 4/4] mi-sym-info.exp: Increase timeout for 114-symbol-info-functions
@ 2021-06-11 16:35 Carlos O'Donell
  0 siblings, 0 replies; 16+ messages in thread
From: Carlos O'Donell @ 2021-06-11 16:35 UTC (permalink / raw)
  To: kevinb, gdb-patches

> Loading libc.so's symbols increased the amount of time needed for
> 114-symbol-info-function to fetch symbols, causing a timeout during my
> testing.  I enclosed the entire block with a "with_timeout_factor 4",
> which fixes the problem for me.  (Using 2 also fixed it for me, but it
> might not be enough when running this test on slower machines.)

Looks good to me.

Tested on x86_64 Fedora Rawhide with new glibc.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>

 
> gdb/testsuite/ChangeLog:
> 
> 	* gdb.mi/mi-sym-info.exp (114-symbol-info-function test): Increase
> 	timeout.
> ---
>  gdb/testsuite/gdb.mi/mi-sym-info.exp | 56 ++++++++++++++--------------
>  1 file changed, 29 insertions(+), 27 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.mi/mi-sym-info.exp b/gdb/testsuite/gdb.mi/mi-sym-info.exp
> index 18f85182a7b..dcd6f7d9187 100644
> --- a/gdb/testsuite/gdb.mi/mi-sym-info.exp
> +++ b/gdb/testsuite/gdb.mi/mi-sym-info.exp
> @@ -123,33 +123,35 @@ gdb_test_multiple $cmd $testname -prompt "${mi_gdb_prompt}$" {
>  # (from the symbol table).  There's often so much output output from
>  # this command that we overflow expect's buffers, avoid this by
>  # fetching the output piece by piece.
> -set testname "List all functions"
> -set cmd "114-symbol-info-functions --include-nondebug"
> -set state 0
> -gdb_test_multiple $cmd ${testname} -prompt "${mi_gdb_prompt}$" {
> -    -re "114\\^done,symbols=\{" {
> -	if { $state == 0 } { set state 1 }
> -	exp_continue
> -    }
> -    -re "debug=\\\[${symtab_re}" {
> -	if { $state == 1 } { set state 2 }
> -	exp_continue
> -    }
> -    -re ",${symtab_re}" {
> -	exp_continue
> -    }
> -    -re "\\\],nondebug=\\\[" {
> -	if { $state == 2 } { set state 3 }
> -	exp_continue
> -    }
> -    -re "\{address=${qstr},name=${qstr}\}," {
> -	exp_continue
> -    }
> -    -re "\{address=${qstr},name=${qstr}\}\\\]\}\r\n${mi_gdb_prompt}$" {
> -	if { $state == 3 } {
> -	    pass $gdb_test_name
> -	} else {
> -	    fail $gdb_test_name
> +with_timeout_factor 4 {
> +    set testname "List all functions"
> +    set cmd "114-symbol-info-functions --include-nondebug"
> +    set state 0
> +    gdb_test_multiple $cmd ${testname} -prompt "${mi_gdb_prompt}$" {
> +	-re "114\\^done,symbols=\{" {
> +	    if { $state == 0 } { set state 1 }
> +	    exp_continue
> +	}
> +	-re "debug=\\\[${symtab_re}" {
> +	    if { $state == 1 } { set state 2 }
> +	    exp_continue
> +	}
> +	-re ",${symtab_re}" {
> +	    exp_continue
> +	}
> +	-re "\\\],nondebug=\\\[" {
> +	    if { $state == 2 } { set state 3 }
> +	    exp_continue
> +	}
> +	-re "\{address=${qstr},name=${qstr}\}," {
> +	    exp_continue
> +	}
> +	-re "\{address=${qstr},name=${qstr}\}\\\]\}\r\n${mi_gdb_prompt}$" {
> +	    if { $state == 3 } {
> +		pass $gdb_test_name
> +	    } else {
> +		fail $gdb_test_name
> +	    }

OK. Confirmed this is the same code just indented with a higher timeout factor.

>  	}
>      }
>  }
> -- 
> 2.31.1

-- 
Cheers,
Carlos.


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

end of thread, other threads:[~2021-06-12  2:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 17:26 [PATCH 0/4] libthread_db initialization changes related to upcoming glibc-2.34 Kevin Buettner
2021-06-10 17:26 ` [PATCH 1/4] " Kevin Buettner
2021-06-11 19:10   ` Simon Marchi
2021-06-11 21:24     ` Kevin Buettner
2021-06-10 17:26 ` [PATCH 2/4] testsuite/glib-2.34: Match/consume optional libthread_db related output Kevin Buettner
2021-06-11 19:13   ` Simon Marchi
2021-06-10 17:26 ` [PATCH 3/4] print-symbol-loading.exp: Allow libc symbols to be already loaded Kevin Buettner
2021-06-11 19:22   ` Simon Marchi
2021-06-11 19:33     ` Kevin Buettner
2021-06-11 21:05       ` Kevin Buettner
2021-06-10 17:26 ` [PATCH 4/4] mi-sym-info.exp: Increase timeout for 114-symbol-info-functions Kevin Buettner
2021-06-11 20:11   ` Simon Marchi
2021-06-11 21:07     ` Kevin Buettner
2021-06-11 22:21 ` [PATCH 0/4] libthread_db initialization changes related to upcoming glibc-2.34 Kevin Buettner
2021-06-12  2:58   ` Carlos O'Donell
2021-06-11 16:35 [PATCH 4/4] mi-sym-info.exp: Increase timeout for 114-symbol-info-functions Carlos O'Donell

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).