diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2015-04-20 00:31:54 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2015-04-20 00:31:54 +0200 |
commit | 110f91128cf3e047eb1e04d346c27d71cc33fb9c (patch) | |
tree | f344f2e11d8fc0b96757371f746ac99a22bd4b11 | |
parent | d214e5e79e38b18bc3786b3e8ba0e55fdbba294b (diff) | |
download | gdb-110f91128cf3e047eb1e04d346c27d71cc33fb9c.zip gdb-110f91128cf3e047eb1e04d346c27d71cc33fb9c.tar.gz gdb-110f91128cf3e047eb1e04d346c27d71cc33fb9c.tar.bz2 |
[GDB] Hurd: Robustify the reply_mig_hack.awk script.
..., so that it also works with the GNU MIG 1.5 just released.
gdb/
* reply_mig_hack.awk: Robustify parsing.
-rw-r--r-- | gdb/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/reply_mig_hack.awk | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 093686f..4bca7d6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2015-04-20 Thomas Schwinge <thomas@codesourcery.com> + * reply_mig_hack.awk: Robustify parsing. + * reply_mig_hack.awk: Don't bother to declare an intermediate function pointer variable. diff --git a/gdb/reply_mig_hack.awk b/gdb/reply_mig_hack.awk index 7eab504..b731115 100644 --- a/gdb/reply_mig_hack.awk +++ b/gdb/reply_mig_hack.awk @@ -49,7 +49,7 @@ parse_phase == 2 { print; next; } -parse_phase == 3 && /}/ { +parse_phase == 3 && /} Request/ { # The args structure is over. if (num_args > 1) parse_phase = 5; @@ -62,6 +62,9 @@ parse_phase == 3 && /}/ { parse_phase == 3 && num_args == 0 { # The type field for an argument. + # This won't be accurate in case of unions being used in the Request struct, + # but that doesn't matter, as we'll only be looking at arg_type_code_name[0], + # which will not be a union type. arg_type_code_name[num_args] = $2; sub (/;$/, "", arg_type_code_name[num_args]) # Get rid of the semi-colon parse_phase = 4; @@ -82,6 +85,9 @@ parse_phase == 3 { parse_phase == 4 { # The value field for an argument. + # This won't be accurate in case of unions being used in the Request struct, + # but that doesn't matter, as we'll only be looking at arg_name[0], which + # will not be a union type. arg_name[num_args] = $2; sub (/;$/, "", arg_name[num_args]) # Get rid of the semi-colon num_args++; |