aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-11-18 09:28:32 -0800
committerDoug Evans <xdje42@gmail.com>2014-11-18 09:28:32 -0800
commitee6f8984bbdbf340816a7f2aebe736f100601b22 (patch)
treec72d2b7fa498e90ac7f679a9ba48e940f523dfa5 /gdb/cli
parenteb822aa6d0f2cdc1a3125da084b96c5bbe32cb86 (diff)
downloadgdb-ee6f8984bbdbf340816a7f2aebe736f100601b22.zip
gdb-ee6f8984bbdbf340816a7f2aebe736f100601b22.tar.gz
gdb-ee6f8984bbdbf340816a7f2aebe736f100601b22.tar.bz2
SYMTAB_DIRNAME: New macro.
gdb/ChangeLog: * symtab.h (SYMTAB_DIRNAME): New macro. All uses of member symtab.dirname updated to use it.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-cmds.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 0c3cfa7..79246ac 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1486,21 +1486,23 @@ compare_symtabs (const void *a, const void *b)
{
const struct symtab_and_line *sala = a;
const struct symtab_and_line *salb = b;
+ const char *dira = SYMTAB_DIRNAME (sala->symtab);
+ const char *dirb = SYMTAB_DIRNAME (salb->symtab);
int r;
- if (!sala->symtab->dirname)
+ if (dira == NULL)
{
- if (salb->symtab->dirname)
+ if (dirb != NULL)
return -1;
}
- else if (!salb->symtab->dirname)
+ else if (dirb == NULL)
{
- if (sala->symtab->dirname)
+ if (dira != NULL)
return 1;
}
else
{
- r = filename_cmp (sala->symtab->dirname, salb->symtab->dirname);
+ r = filename_cmp (dira, dirb);
if (r)
return r;
}