[binutils-gdb] Use block_enum instead of int for better typesafety

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[binutils-gdb] Use block_enum instead of int for better typesafety

gdb-buildbot
*** TEST RESULTS FOR COMMIT c32e6a04f42b8e4a1392ee4b87d040c06b917ef5 ***

commit c32e6a04f42b8e4a1392ee4b87d040c06b917ef5
Author:     Christian Biesinger <[hidden email]>
AuthorDate: Thu Jul 11 13:35:13 2019 -0500
Commit:     Christian Biesinger <[hidden email]>
CommitDate: Sun Jul 21 22:23:12 2019 -0500

    Use block_enum instead of int for better typesafety
   
    gdb/ChangeLog:
   
    2019-07-21  Christian Biesinger  <[hidden email]>
   
            * symtab.c (lookup_symbol_in_objfile_symtabs): Change int to block_enum.
            (lookup_symbol_in_objfile): Change int to block_enum and add a
            gdb_assert to make sure block_index is GLOBAL_BLOCK or STATIC_BLOCK.

diff --git a/gdb/symtab.c b/gdb/symtab.c
index 719e5b2ee9..ce1cdcf9e7 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -92,7 +92,8 @@ struct block_symbol lookup_local_symbol (const char *name,
  enum language language);
 
 static struct block_symbol
-  lookup_symbol_in_objfile (struct objfile *objfile, int block_index,
+  lookup_symbol_in_objfile (struct objfile *objfile,
+    enum block_enum block_index,
     const char *name, const domain_enum domain);
 
 /* Type of the data stored on the program space.  */
@@ -2244,8 +2245,9 @@ lookup_global_symbol_from_objfile (struct objfile *main_objfile,
    static symbols.  */
 
 static struct block_symbol
-lookup_symbol_in_objfile_symtabs (struct objfile *objfile, int block_index,
-  const char *name, const domain_enum domain)
+lookup_symbol_in_objfile_symtabs (struct objfile *objfile,
+  enum block_enum block_index, const char *name,
+  const domain_enum domain)
 {
   gdb_assert (block_index == GLOBAL_BLOCK || block_index == STATIC_BLOCK);
 
@@ -2516,11 +2518,13 @@ lookup_symbol_in_static_block (const char *name,
    BLOCK_INDEX is one of GLOBAL_BLOCK or STATIC_BLOCK.  */
 
 static struct block_symbol
-lookup_symbol_in_objfile (struct objfile *objfile, int block_index,
+lookup_symbol_in_objfile (struct objfile *objfile, enum block_enum block_index,
   const char *name, const domain_enum domain)
 {
   struct block_symbol result;
 
+  gdb_assert (block_index == GLOBAL_BLOCK || block_index == STATIC_BLOCK);
+
   if (symbol_lookup_debug)
     {
       fprintf_unfiltered (gdb_stdlog,
Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-i686, branch master

gdb-buildbot
Buildername:
        Fedora-i686

Worker:
        fedora-x86-64-4

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/18/builds/354

Author:
        Christian Biesinger <[hidden email]>

Commit tested:
        c32e6a04f42b8e4a1392ee4b87d040c06b917ef5

Subject of commit:
        Use block_enum instead of int for better typesafety

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-i686/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=0: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-i686/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-i686/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-cc-with-index, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-cc-with-index

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/20/builds/353

Author:
        Christian Biesinger <[hidden email]>

Commit tested:
        c32e6a04f42b8e4a1392ee4b87d040c06b917ef5

Subject of commit:
        Use block_enum instead of int for better typesafety

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5/

*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.threads/process-dies-while-detaching.exp: single-process: continue: watchpoint: continue
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-cc-with-index/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-gdbserver-m32, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-native-gdbserver-m32

Worker:
        fedora-x86-64-3

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/24/builds/351

Author:
        Christian Biesinger <[hidden email]>

Commit tested:
        c32e6a04f42b8e4a1392ee4b87d040c06b917ef5

Subject of commit:
        Use block_enum instead of int for better typesafety

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m32/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-m64, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-m64

Worker:
        fedora-x86-64-2

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/3/builds/376

Author:
        Christian Biesinger <[hidden email]>

Commit tested:
        c32e6a04f42b8e4a1392ee4b87d040c06b917ef5

Subject of commit:
        Use block_enum instead of int for better typesafety

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5/

*** Diff to previous build ***
==============================================
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-m64/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5//xfail.table.gz>

Reply | Threaded
Open this post in threaded view
|

Failures on Fedora-x86_64-native-gdbserver-m64, branch master

gdb-buildbot
In reply to this post by gdb-buildbot
Buildername:
        Fedora-x86_64-native-gdbserver-m64

Worker:
        fedora-x86-64-1

Full Build URL:
        https://gdb-buildbot.osci.io/#builders/22/builds/351

Author:
        Christian Biesinger <[hidden email]>

Commit tested:
        c32e6a04f42b8e4a1392ee4b87d040c06b917ef5

Subject of commit:
        Use block_enum instead of int for better typesafety

Testsuite logs (gdb.sum, gdb.log and others):
        https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5/

*** Diff to previous build ***
==============================================
PASS -> FAIL: gdb.base/gdb-sigterm.exp: 50 SIGTERM passes
new FAIL: gdb.cp/mb-templates.exp: disable breakpoint: disable
new FAIL: gdb.cp/mb-templates.exp: disable breakpoint: run to breakpoint
new FAIL: gdb.cp/mb-templates.exp: disabling location: disable
new FAIL: gdb.cp/mb-templates.exp: disabling location: enable
new FAIL: gdb.cp/mb-templates.exp: disabling location: run to breakpoint
new FAIL: gdb.cp/mb-templates.exp: info breakpoints
PASS -> FAIL: gdb.cp/mb-templates.exp: initial condition: run to breakpoint
new FAIL: gdb.cp/mb-templates.exp: instantiation: run to breakpoint
new FAIL: gdb.cp/mb-templates.exp: instantiation: run to breakpoint 2
new UNRESOLVED: gdb.cp/mb-templates.exp: instantiation: set breakpoint
new FAIL: gdb.cp/mb-templates.exp: separate condition: run to breakpoint
new FAIL: gdb.cp/mb-templates.exp: separate condition: run to breakpoint 2
PASS -> FAIL: gdb.cp/namelessclass.exp: continue to breakpoint: continue to breakpoint at line 28
PASS -> KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=off: cond_bp_target=1: inferior 1 exited
==============================================

*** Complete list of XFAILs for this builder ***

To obtain the list of XFAIL tests for this builder, go to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5//xfail.gz>

You can also see a pretty-printed version of the list, with more information
about each XFAIL, by going to:

        <https://gdb-buildbot.osci.io/results/Fedora-x86_64-native-gdbserver-m64/c3/c32e6a04f42b8e4a1392ee4b87d040c06b917ef5//xfail.table.gz>