From d47642c93dda6344af12458e4e26587f3353fb44 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 6 Jan 2014 16:01:08 +0100 Subject: [PATCH] Hurd: Make MIG output parsing more robust. gdb/ * reply_mig_hack.awk: In phase 5, keep going if we have not yet collected the type check structures. Based on a patch by David Michael . --- gdb/ChangeLog | 3 +++ gdb/reply_mig_hack.awk | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 322e4aa85f..7424b1af28 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2014-02-16 Thomas Schwinge + * reply_mig_hack.awk: In phase 5, keep going if we have not yet + collected the type check structures. + * reply_mig_hack.awk: Don't expect to see the auto keyword. 2014-02-14 Doug Evans diff --git a/gdb/reply_mig_hack.awk b/gdb/reply_mig_hack.awk index 6d276857ec..15bfdfb090 100644 --- a/gdb/reply_mig_hack.awk +++ b/gdb/reply_mig_hack.awk @@ -92,6 +92,12 @@ parse_phase == 5 && /^[ \t]*mig_external kern_return_t/ { } parse_phase == 5 && /^#if[ \t]TypeCheck/ { + # Keep going if we have not yet collected the type check structures. + if (num_checks == 0) + { + print; next; + } + # The first args type checking statement; we need to insert our chunk of # code that bypasses all the type checks if this is an error return, after # which we're done until we get to the next function. Handily, the size