Skip to content
Snippets Groups Projects
  • Andrew Burgess's avatar
    2ecee236
    gdb: use -1 for breakpoint::task default value · 2ecee236
    Andrew Burgess authored
    
    Within the breakpoint struct we have two fields ::thread and ::task
    which are used for thread or task specific breakpoints.  When a
    breakpoint doesn't have a specific thread or task then these fields
    have the values -1 and 0 respectively.
    
    There's no particular reason (as far as I can tell) why these two
    "default" values are different, and I find the difference a little
    confusing.  Long term I'd like to potentially fold these two fields
    into a single field, but that isn't what this commit does.
    
    What this commit does is switch to using -1 as the "default" value for
    both fields, this means that the default for breakpoint::task has
    changed from 0 to -1.   I've updated all the code I can find that
    relied on the value of 0, and I see no test regressions, especially in
    gdb.ada/tasks.exp, which still fully passes.
    
    There should be no user visible changes after this commit.
    
    Approved-By: default avatarPedro Alves <pedro@palves.net>
    2ecee236
    History
    gdb: use -1 for breakpoint::task default value
    Andrew Burgess authored
    
    Within the breakpoint struct we have two fields ::thread and ::task
    which are used for thread or task specific breakpoints.  When a
    breakpoint doesn't have a specific thread or task then these fields
    have the values -1 and 0 respectively.
    
    There's no particular reason (as far as I can tell) why these two
    "default" values are different, and I find the difference a little
    confusing.  Long term I'd like to potentially fold these two fields
    into a single field, but that isn't what this commit does.
    
    What this commit does is switch to using -1 as the "default" value for
    both fields, this means that the default for breakpoint::task has
    changed from 0 to -1.   I've updated all the code I can find that
    relied on the value of 0, and I see no test regressions, especially in
    gdb.ada/tasks.exp, which still fully passes.
    
    There should be no user visible changes after this commit.
    
    Approved-By: default avatarPedro Alves <pedro@palves.net>