This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug gdb/17156] New: completion needs to handle parse errors better


https://sourceware.org/bugzilla/show_bug.cgi?id=17156

            Bug ID: 17156
           Summary: completion needs to handle parse errors better
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: minor
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: dje at google dot com

Testcase:

struct a
{
  int x, y;
  short s, t;
};

int
main ()
{
  struct a foo = { 1, 2, 3, 4 };

  return 0;
}

(gdb) pty struct a.x
A syntax error in expression, near `.x'.
(gdb) complete pty struct a.x
pty struct a.x
pty struct a.x_destroy
pty struct a.x_getpostn
pty struct a.x_inline
pty struct a.x_putbytes
pty struct a.x_putint32
[... every global symbol that starts with "x" ...]

With "set debug parse 1", I see parsing stopping at the ".", but then the
completer just keeps going, ignoring the error.

Both expression_completer and parse_expression_for_completion watch for errors,
but it doesn't seem right to (essentially) ignore them.  At least not in this
case.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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