[Crash-utility] Problem with crash-7.2.6 and certain print commands?

Dave Wysochanski dwysocha at redhat.com
Wed May 15 16:40:54 UTC 2019


We rebuilt crash with the tarball from:
http://people.redhat.com/anderson/crash-7.2.6.tar.gz

I thought initially something had gone wrong with the tarball, so I
redownloaded it myself and did an md5sum.  This checked out ok.  I

We had a report that the print command was broken, specifically this
failed:

crash> pd ((struct zone *)0xffff901e3ffda000)->min_slab_pages
p: invalid option -- '>'
p: invalid option -- 'm'
p: invalid option -- 'i'
p: invalid option -- 'n'
p: invalid option -- '_'
p: invalid option -- 's'
p: invalid option -- 'l'
p: invalid option -- 'a'
p: invalid option -- 'b'
p: invalid option -- '_'
p: invalid option -- 'p'
p: invalid option -- 'a'
p: invalid option -- 'g'
p: invalid option -- 'e'
p: invalid option -- 's'
Usage:
  p [-x|-d][-u] [expression | symbol[:cpuspec]]
Enter "help p" for details.



We thought we didn't have this commit:

commit 977c3a20a053eaff5b1f0c95246f88cd66712f27
Author: Dave Anderson <anderson at redhat.com>
Date:   Thu Jan 24 13:36:02 2019 -0500

    Fix for the "p" command if the expression contains more than one
    opening parenthesis character and a minus/dash sign.  Without the
    patch, the minus/dash sign will get dropped from the command prior
    to it being passed on to gdb for evaluation, and the command will
    fail with the message "p: gdb request failed: <expression>",
    where the <expression> string will not contain the minus/dash sign.
    (anderson at redhat.com)

diff --git a/symbols.c b/symbols.c
index 5f77e27..6814723 100644
--- a/symbols.c
+++ b/symbols.c
@@ -1,8 +1,8 @@
 /* symbols.c - core analysis suite
  *
  * Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
- * Copyright (C) 2002-2018 David Anderson
- * Copyright (C) 2002-2018 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2002-2019 David Anderson
+ * Copyright (C) 2002-2019 Red Hat, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -7201,7 +7201,7 @@ cmd_p(void)
                        *(cpuspec-1) = ':';
        }
 
-       process_gdb_output(concat_args(buf1, 0, TRUE), radix,
+       process_gdb_output(concat_args(buf1, 0, FALSE), radix,
                           sp ? sp->name : NULL, do_load_module_filter);
 }



But this was reverted again in:

commit e082c372c7f1a782b058ec359dfbbbee0f0b6aad
Author: Dave Anderson <anderson at redhat.com>
Date:   Thu Jan 31 12:08:43 2019 -0500

    Fix for the internal parse_line() utility function to account for
    embedded sets of parentheses, which may be used for expressions that
    are passed to gdb by the "p" command.  Without the patch, expressions
    containing embedded sets of parentheses are broken up into multiple
    argument tokens instead of just one.  The previous commit has been
    reverted by this one.
    (anderson at redhat.com)

diff --git a/symbols.c b/symbols.c
index 6814723..e73e735 100644
--- a/symbols.c
+++ b/symbols.c
@@ -7201,7 +7201,7 @@ cmd_p(void)
                        *(cpuspec-1) = ':';
        }
 
-       process_gdb_output(concat_args(buf1, 0, FALSE), radix,
+       process_gdb_output(concat_args(buf1, 0, TRUE), radix,
                           sp ? sp->name : NULL, do_load_module_filter);
 }
 




More information about the Crash-utility mailing list