X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fobserver.c;h=fb9beb1e9636272b3692a411ce0ff4361e16e99a;hb=809df4465f01277ab689fb82b3f16ff79f9a2606;hp=9e69cb6a0f946582adacb45eeb4344bbe73dec02;hpb=6aba47ca06d9150c6196a374b745c2711b46e045;p=binutils-gdb.git diff --git a/gdb/observer.c b/gdb/observer.c index 9e69cb6a0f9..fb9beb1e963 100644 --- a/gdb/observer.c +++ b/gdb/observer.c @@ -1,12 +1,13 @@ /* GDB Notifications to Observers. - Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. This file is part of GDB. 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 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -15,9 +16,7 @@ GNU 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., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ /* An observer is an entity who is interested in being notified when GDB reaches certain states, or certain events occur in GDB. The entity being @@ -92,6 +91,7 @@ static struct observer_list * xalloc_observer_list_node (void) { struct observer_list *node = XMALLOC (struct observer_list); + node->observer = XMALLOC (struct observer); return node; } @@ -183,19 +183,19 @@ int observer_test_second_observer = 0; int observer_test_third_observer = 0; void -observer_test_first_notification_function (struct bpstats *bs) +observer_test_first_notification_function (int arg) { observer_test_first_observer++; } void -observer_test_second_notification_function (struct bpstats *bs) +observer_test_second_notification_function (int arg) { observer_test_second_observer++; } void -observer_test_third_notification_function (struct bpstats *bs) +observer_test_third_notification_function (int arg) { observer_test_third_observer++; }