X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fobserver.sh;h=dde80566056aa3cbbcf5611ee21bc014cd6112ff;hb=9904185cfde13d6c6849f1f042c8e3b74974cf08;hp=2bb1c2dacbe14552388b9526770785a00c724d10;hpb=4c38e0a4fcb69f8586d8db0b9cdb8dbab5980811;p=binutils-gdb.git diff --git a/gdb/observer.sh b/gdb/observer.sh index 2bb1c2dacbe..dde80566056 100755 --- a/gdb/observer.sh +++ b/gdb/observer.sh @@ -29,8 +29,7 @@ rm -f ${otmp} cat <>${otmp} /* GDB Notifications to Observers. - Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. + Copyright (C) 2004-2015 Free Software Foundation, Inc. This file is part of GDB. @@ -64,6 +63,8 @@ struct bpstats; struct so_list; struct objfile; struct thread_info; +struct inferior; +struct trace_state_variable; EOF ;; esac @@ -136,8 +137,17 @@ static void observer_${event}_notification_stub (const void *data, const void *args_data) { observer_${event}_ftype *notify = (observer_${event}_ftype *) data; +EOF + + notify_args=`echo ${actual} | sed -e 's/\([a-z0-9_][a-z0-9_]*\)/args->\1/g'` + + if test ! -z "${notify_args}"; then + cat<>${otmp} const struct ${event}_args *args = args_data; - notify (`echo ${actual} | sed -e 's/\([a-z0-9_][a-z0-9_]*\)/args->\1/g'`); +EOF + fi + cat <>${otmp} + notify (${notify_args}); } struct observer *