This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: so-thresh.exp problems


Nobody currently maintains the gdb.hp part of the testsuite, so you
can check fixes in if you want.  I am sure it will improve things.

But I don't know about gdb/somsolib.c.  As a "Past Maintainer", you are
probably the closest thing we have for an HP maintainer :-)  But is not
my call.

Regards,
Fernando

law@redhat.com wrote:
> 
> We're failing a handful of the so-thresh.exp tests on the PA.  There's a
> few issues that need to be addressed.
> 
>         * The coommand to set the autoload threshold is
>           auto-solib-limit, not auto-solib-add.  That was a global
>           search and replace in so-thresh.exp.
> 
>         * Some of the text related to auto-solib-limit has been changed
>           over time and so-thresh.exp wasn't updated.  Oops.
> 
>         * A threshold of zero indicates that no threshold is in place.
>           somsolib.c needed to be tweaked to handle that properly.
> 
>         * The test assumes you're compiling with HP's compiler.  So
>           the makefile has been updated to force the use of cc.
> 
> With these patches we now pass so-thresh.exp without any unexpected failures.
> 
> 
>         * somsolib.c (som_solib_add): Ignore the solib limit threshhold
>         if AUTO_SOLIB_LIMIT is not greater than zero.
> 
>         * gdb.hp/gdb.base-hp/so-thresh.exp: Update text in expect strings
>         to match current gdb output.  Update due to using auto-solib-limit
>         for limiting instead of overloading auto-solib-add.
>         * gdb.hp/gdb.base-hp/so-thresh.mk: Always use "cc" to build the
>         test program.
> 
> Index: somsolib.c
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/somsolib.c,v
> retrieving revision 2.48.12.1
> diff -c -3 -p -r2.48.12.1 somsolib.c
> *** somsolib.c  2001/12/19 21:21:38     2.48.12.1
> --- somsolib.c  2001/12/20 22:18:36
> *************** som_solib_add (char *arg_string, int fro
> *** 777,782 ****
> --- 777,783 ----
>         st_size = som_solib_sizeof_symbol_table (name);
>         som_solib_st_size_threshold_exceeded =
>         !from_tty &&
> +       auto_solib_limit > 0 &&
>         readsyms &&
>         ((st_size + som_solib_total_st_size) > (auto_solib_limit * (LONGEST) (1024
> * 1024)));
> 
> Index: testsuite/gdb.hp/gdb.base-hp/so-thresh.exp
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.exp,v
> retrieving revision 1.1
> diff -c -3 -p -r1.1 so-thresh.exp
> *** so-thresh.exp       1999/08/10 01:54:31     1.1
> --- so-thresh.exp       2001/12/20 22:18:36
> *************** send_user "Making with '${srcdir}/${subd
> *** 67,73 ****
>   remote_exec build "${srcdir}/${subdir}/${testfile}.sh $subdir"
> 
>   # Only HP-UX (and any other platforms using SOM shared libraries, I
> ! # guess) interprets the auto-solib-add variable as a threshhold,
>   # rather than a boolean that strictly enables or disables automatic
>   # loading of shlib symbol tables.
>   #
> --- 67,73 ----
>   remote_exec build "${srcdir}/${subdir}/${testfile}.sh $subdir"
> 
>   # Only HP-UX (and any other platforms using SOM shared libraries, I
> ! # guess) interprets the auto-solib-limit variable as a threshhold,
>   # rather than a boolean that strictly enables or disables automatic
>   # loading of shlib symbol tables.
>   #
> *************** gdb_load ${binfile}
> *** 90,133 ****
>   # debugger's symbol table reaches a specified threshhold.
>   #
> 
> ! # On HP-UX, the help text for auto-solib-add mentions that it
>   # serves as a threshhold.
>   #
> ! send_gdb "help set auto-solib-add\n"
>   gdb_expect {
> !   -re "Set autoloading size threshold .in megabytes. of shared library
> symbols.*
> ! If nonzero, symbols from all shared object libraries will be loaded.*
> ! automatically when the inferior begins execution or when the dynamic linker.*
> ! informs gdb that a new library has been loaded, until the symbol table.*
> ! of the program and libraries exceeds this threshold.*
> ! Otherwise, symbols must be loaded manually, using
> `sharedlibrary'.*$gdb_prompt $"\
> !           {pass "help set auto-solib-add"}
>     -re "$gdb_prompt $"\
> !           {fail "help set auto-solib-add"}
> !   timeout {fail "(timeout) help set auto-solib-add"}
>   }
> 
>   # On HP-UX, the threshhold is by default set to 50, which means
>   # 50 megabytes.
>   #
> ! send_gdb "show auto-solib-add\n"
>   gdb_expect {
> !   -re "Autoloading size threshold .in megabytes. of shared library symbols
> is $decimal.*$gdb_prompt $"\
> !           {pass "show auto-solib-add "}
> !   -re "Autoloading size threshold \(in megabytes\) of shared library symbols
> is $decimal.$gdb_prompt $"\
> !           {pass "show auto-solib-add "}
>     -re "$gdb_prompt $"\
> !           {fail "show auto-solib-add "}
> !   timeout {fail "(timeout) show auto-solib-add "}
>   }
> 
> ! send_gdb "set auto-solib-add 1\n"
>   gdb_expect {
>      -re ".*$gdb_prompt $"
> !             {pass "set auto-solib-add to 1"}
>      -re ".*$gdb_prompt $"
> !             {fail "set auto-solib-add to 1"}
> !    timeout {fail "(timeout) set auto-solib-add to 1"}
>   }
> 
> 
> --- 90,129 ----
>   # debugger's symbol table reaches a specified threshhold.
>   #
> 
> ! # On HP-UX, the help text for auto-solib-limit mentions that it
>   # serves as a threshhold.
>   #
> ! send_gdb "help set auto-solib-limit\n"
>   gdb_expect {
> !   -re "Set threshold .in Mb. for autoloading shared library symbols.*
> ! When shared library autoloading is enabled, new libraries will be loaded.*
> ! only until the total size of shared library symbols exceeds this.*
> ! threshold in megabytes.  Is ignored when using .sharedlibrary.*$gdb_prompt
> $"\
> !           {pass "help set auto-solib-limit"}
>     -re "$gdb_prompt $"\
> !           {fail "help set auto-solib-limit"}
> !   timeout {fail "(timeout) help set auto-solib-limit"}
>   }
> 
>   # On HP-UX, the threshhold is by default set to 50, which means
>   # 50 megabytes.
>   #
> ! send_gdb "show auto-solib-limit\n"
>   gdb_expect {
> !   -re "Threshold .in Mb. for autoloading shared library symbols is
> $decimal.*$gdb_prompt $"\
> !           {pass "show auto-solib-limit "}
>     -re "$gdb_prompt $"\
> !           {fail "show auto-solib-limit "}
> !   timeout {fail "(timeout) show auto-solib-limit "}
>   }
> 
> ! send_gdb "set auto-solib-limit 1\n"
>   gdb_expect {
>      -re ".*$gdb_prompt $"
> !             {pass "set auto-solib-limit to 1"}
>      -re ".*$gdb_prompt $"
> !             {fail "set auto-solib-limit to 1"}
> !    timeout {fail "(timeout) set auto-solib-limit to 1"}
>   }
> 
> 
> *************** gdb_expect {
> *** 152,165 ****
>   send_gdb "run\n"
>   gdb_expect {
>     -re ".*warning. Symbols for some libraries have not been loaded, because.*
> ! doing so would exceed the size threshold specified by auto-solib-add.*
>   To manually load symbols, use the 'sharedlibrary' command.*
> ! To raise the threshold, set auto-solib-add to a larger value and rerun.*
>   the program.*$gdb_prompt $"\
> !           {pass "run to main hit auto-solib-add threshold"}
>     -re "$gdb_prompt $"\
> !           {fail "run to main hit auto-solib-add threshold"}
> !   timeout {fail "(timeout) run to main hit auto-solib-add threshold"}
>   }
> 
>   # Verify that "info share" mentions something about libraries whose
> --- 148,161 ----
>   send_gdb "run\n"
>   gdb_expect {
>     -re ".*warning. Symbols for some libraries have not been loaded, because.*
> ! doing so would exceed the size threshold specified by auto-solib-limit.*
>   To manually load symbols, use the 'sharedlibrary' command.*
> ! To raise the threshold, set auto-solib-limit to a larger value and rerun.*
>   the program.*$gdb_prompt $"\
> !           {pass "run to main hit auto-solib-limit threshold"}
>     -re "$gdb_prompt $"\
> !           {fail "run to main hit auto-solib-limit threshold"}
> !   timeout {fail "(timeout) run to main hit auto-solib-limit threshold"}
>   }
> 
>   # Verify that "info share" mentions something about libraries whose
> *************** gdb_expect {
> *** 251,268 ****
>     timeout {fail "(timeout) 2 set break at main"}
>   }
> 
> ! send_gdb "set auto-solib-add 9999\n"
>   gdb_expect {
>     -re "$gdb_prompt $"\
> !           {pass "set auto-solib-add threshold to practical infinity"}
> !   timeout {fail "(timeout) set auto-solib-add threshold to practical
> infinity"}
>   }
>   send_gdb "run\n"
>   gdb_expect {
>     -re ".*warning. Symbols for some libraries have not been loaded, because.*
> ! doing so would exceed the size threshold specified by auto-solib-add.*
>   To manually load symbols, use the 'sharedlibrary' command.*
> ! To raise the threshold, set auto-solib-add to a larger value and rerun.*
>   the program.*$gdb_prompt $"\
>             {fail "rerun threshold at practical infinity (still hit
> threshold)"}
>     -re "$gdb_prompt $"\
> --- 247,264 ----
>     timeout {fail "(timeout) 2 set break at main"}
>   }
> 
> ! send_gdb "set auto-solib-limit 9999\n"
>   gdb_expect {
>     -re "$gdb_prompt $"\
> !           {pass "set auto-solib-limit threshold to practical infinity"}
> !   timeout {fail "(timeout) set auto-solib-limit threshold to practical
> infinity"}
>   }
>   send_gdb "run\n"
>   gdb_expect {
>     -re ".*warning. Symbols for some libraries have not been loaded, because.*
> ! doing so would exceed the size threshold specified by auto-solib-limit.*
>   To manually load symbols, use the 'sharedlibrary' command.*
> ! To raise the threshold, set auto-solib-limit to a larger value and rerun.*
>   the program.*$gdb_prompt $"\
>             {fail "rerun threshold at practical infinity (still hit
> threshold)"}
>     -re "$gdb_prompt $"\
> *************** gdb_expect {
> *** 297,314 ****
>     timeout {fail "(timeout) 3 set break at main"}
>   }
> 
> ! send_gdb "set auto-solib-add 0\n"
>   gdb_expect {
>     -re "$gdb_prompt $"\
> !           {pass "set auto-solib-add threshold to 0"}
> !   timeout {fail "(timeout) set auto-solib-add threshold to 0"}
>   }
>   send_gdb "run\n"
>   gdb_expect {
>     -re ".*warning. Symbols for some libraries have not been loaded, because.*
> ! doing so would exceed the size threshold specified by auto-solib-add.*
>   To manually load symbols, use the 'sharedlibrary' command.*
> ! To raise the threshold, set auto-solib-add to a larger value and rerun.*
>   the program.*$gdb_prompt $"\
>             {fail "rerun threshold at 0 (still hit threshold)"}
>     -re "$gdb_prompt $"\
> --- 293,310 ----
>     timeout {fail "(timeout) 3 set break at main"}
>   }
> 
> ! send_gdb "set auto-solib-limit 0\n"
>   gdb_expect {
>     -re "$gdb_prompt $"\
> !           {pass "set auto-solib-limit threshold to 0"}
> !   timeout {fail "(timeout) set auto-solib-limit threshold to 0"}
>   }
>   send_gdb "run\n"
>   gdb_expect {
>     -re ".*warning. Symbols for some libraries have not been loaded, because.*
> ! doing so would exceed the size threshold specified by auto-solib-limit.*
>   To manually load symbols, use the 'sharedlibrary' command.*
> ! To raise the threshold, set auto-solib-limit to a larger value and rerun.*
>   the program.*$gdb_prompt $"\
>             {fail "rerun threshold at 0 (still hit threshold)"}
>     -re "$gdb_prompt $"\
> Index: testsuite/gdb.hp/gdb.base-hp/so-thresh.mk
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.hp/gdb.base-hp/so-thresh.mk,v
> retrieving revision 1.1
> diff -c -3 -p -r1.1 so-thresh.mk
> *** so-thresh.mk        1999/08/10 01:54:31     1.1
> --- so-thresh.mk        2001/12/20 22:18:36
> ***************
> *** 3,8 ****
> --- 3,9 ----
>   OBJDIR=.
>   SRCDIR=.
>   CFLAGS = +DA1.1 -g
> + CC=cc
> 
>   # This is how to build this generator.
>   genso-thresh.o: ${SRCDIR}/genso-thresh.c

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]