From aa7a88a347fda1b709ed18745f832e15441125dd Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Thu, 9 Jan 2014 23:50:07 +0100 Subject: [PATCH] Type proc_each_breakpoint properly --- proc.c | 6 +++--- proc.h | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/proc.c b/proc.c index 97bcb60..09e6d9b 100644 --- a/proc.c +++ b/proc.c @@ -1,6 +1,6 @@ /* * This file is part of ltrace. - * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc. + * Copyright (C) 2011,2012,2013,2014 Petr Machata, Red Hat Inc. * Copyright (C) 2010 Joe Damato * Copyright (C) 1998,2009 Juan Cespedes * @@ -1000,8 +1000,8 @@ each_breakpoint_cb(arch_addr_t *key, struct breakpoint **bpp, void *d) return data->cb(data->proc, *bpp, data->cb_data); } -void * -proc_each_breakpoint(struct process *proc, void *start, +arch_addr_t * +proc_each_breakpoint(struct process *proc, arch_addr_t *start, enum callback_status (*cb)(struct process *proc, struct breakpoint *bp, void *data), void *data) diff --git a/proc.h b/proc.h index 35943c3..a88546e 100644 --- a/proc.h +++ b/proc.h @@ -1,6 +1,6 @@ /* * This file is part of ltrace. - * Copyright (C) 2010,2011,2012,2013 Petr Machata, Red Hat Inc. + * Copyright (C) 2010,2011,2012,2013,2014 Petr Machata, Red Hat Inc. * Copyright (C) 2010 Joe Damato * Copyright (C) 1998,2001,2008,2009 Juan Cespedes * @@ -226,11 +226,12 @@ void proc_remove_breakpoint(struct process *proc, struct breakpoint *bp); /* Iterate through the breakpoints of PROC. See callback.h for notes * on iteration interfaces. */ -void *proc_each_breakpoint(struct process *proc, void *start, - enum callback_status (*cb)(struct process *proc, - struct breakpoint *bp, - void *data), - void *data); +arch_addr_t *proc_each_breakpoint(struct process *proc, arch_addr_t *start, + enum callback_status (*cb) + (struct process *proc, + struct breakpoint *bp, + void *data), + void *data); /* Iterate through the dynamic section at src_addr looking for D_TAG. * If tag is found, fill it's value in RET and return 0. -- 2.7.4