projects
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2010-07-13 Emmanuel Thomé <Emmanuel.Thome@gmail.com>
[binutils-gdb.git]
/
gdb
/
reply_mig_hack.awk
diff --git
a/gdb/reply_mig_hack.awk
b/gdb/reply_mig_hack.awk
index 310a40cbb9b4c74a89586a797b471eaf955f3850..49a5f8325c79d8d08dff3fe98cb5e1cb9cac1c1b 100644
(file)
--- a/
gdb/reply_mig_hack.awk
+++ b/
gdb/reply_mig_hack.awk
@@
-1,12
+1,13
@@
# Reply server mig-output massager
#
# Reply server mig-output massager
#
-# Copyright (C) 1995 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1996, 1999, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
#
# Written by Miles Bader <miles@gnu.ai.mit.edu>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
#
# Written by Miles Bader <miles@gnu.ai.mit.edu>
#
# 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 the Free Software Foundation; either version
2
, or (at
+# published by the Free Software Foundation; either version
3
, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@
-15,8
+16,7
@@
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# This awk script hacks the output of mig-generated reply server code
# so that it allows replies with just the error-code in them (as this is
#
# This awk script hacks the output of mig-generated reply server code
# so that it allows replies with just the error-code in them (as this is
@@
-79,7
+79,7
@@
parse_phase == 4 {
print; next;
}
print; next;
}
-parse_phase == 5 && /^[ \t]*
static
const mach_msg_type_t/ {
+parse_phase == 5 && /^[ \t]*
(auto|static)
const mach_msg_type_t/ {
# The type check structure for an argument.
arg_check_name[num_checks] = $4;
num_checks++;
# The type check structure for an argument.
arg_check_name[num_checks] = $4;
num_checks++;
@@
-100,7
+100,7
@@
parse_phase == 5 && /^#if[ \t]TypeCheck/ {
# structure that we want to check for.
print "\tif (In0P->Head.msgh_size == sizeof (Reply)";
print "\t && ! (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX)";
# structure that we want to check for.
print "\tif (In0P->Head.msgh_size == sizeof (Reply)";
print "\t && ! (In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX)";
- print "\t &&
*(int *)&In0P->" arg_type_code_name[0] " == *(int *)&" arg_check_name[0]
;
+ print "\t &&
! BAD_TYPECHECK(&In0P->" arg_type_code_name[0] ", &" arg_check_name[0] ")"
;
print "\t && In0P->" arg_name[0] " != 0)";
print "\t /* Error return, only the error code argument is passed. */";
print "\t {";
print "\t && In0P->" arg_name[0] " != 0)";
print "\t /* Error return, only the error code argument is passed. */";
print "\t {";