Drop useless argument from breakpoint_clone
diff --git a/breakpoint.h b/breakpoint.h
index 18af7a9..963cc66 100644
--- a/breakpoint.h
+++ b/breakpoint.h
@@ -1,6 +1,6 @@
/*
* This file is part of ltrace.
- * Copyright (C) 2012 Petr Machata, Red Hat Inc.
+ * Copyright (C) 2012, 2013 Petr Machata, Red Hat Inc.
* Copyright (C) 2009 Juan Cespedes
*
* This program is free software; you can redistribute it and/or
@@ -82,11 +82,10 @@
arch_addr_t addr, struct library_symbol *libsym);
/* Make a clone of breakpoint BP into the area of memory pointed to by
- * RETP. The original breakpoint was assigned to process OLD_PROC,
- * the cloned breakpoint will be attached to process NEW_PROC.
+ * RETP. Symbols of cloned breakpoint are looked up in NEW_PROC.
* Returns 0 on success or a negative value on failure. */
int breakpoint_clone(struct breakpoint *retp, struct process *new_proc,
- struct breakpoint *bp, struct process *old_proc);
+ struct breakpoint *bp);
/* Set callbacks. If CBS is non-NULL, then BP->cbs shall be NULL. */
void breakpoint_set_callbacks(struct breakpoint *bp, struct bp_callbacks *cbs);
diff --git a/breakpoints.c b/breakpoints.c
index 41fac5d..8b5532a 100644
--- a/breakpoints.c
+++ b/breakpoints.c
@@ -121,7 +121,7 @@
#endif
static void
-breakpoint_init_base(struct breakpoint *bp, struct process *proc,
+breakpoint_init_base(struct breakpoint *bp,
arch_addr_t addr, struct library_symbol *libsym)
{
bp->cbs = NULL;
@@ -139,7 +139,7 @@
breakpoint_init(struct breakpoint *bp, struct process *proc,
arch_addr_t addr, struct library_symbol *libsym)
{
- breakpoint_init_base(bp, proc, addr, libsym);
+ breakpoint_init_base(bp, addr, libsym);
return arch_breakpoint_init(proc, bp);
}
@@ -161,7 +161,7 @@
int
breakpoint_clone(struct breakpoint *retp, struct process *new_proc,
- struct breakpoint *bp, struct process *old_proc)
+ struct breakpoint *bp)
{
struct library_symbol *libsym = NULL;
if (bp->libsym != NULL) {
@@ -169,7 +169,7 @@
assert(rc == 0);
}
- breakpoint_init_base(retp, new_proc, bp->addr, libsym);
+ breakpoint_init_base(retp, bp->addr, libsym);
memcpy(retp->orig_value, bp->orig_value, sizeof(bp->orig_value));
retp->enabled = bp->enabled;
if (arch_breakpoint_clone(retp, bp) < 0)
diff --git a/proc.c b/proc.c
index 4d6c0f7..c186aba 100644
--- a/proc.c
+++ b/proc.c
@@ -336,8 +336,7 @@
struct breakpoint *clone = malloc(sizeof(*clone));
if (clone == NULL
- || breakpoint_clone(clone, data->new_proc,
- bp, data->old_proc) < 0) {
+ || breakpoint_clone(clone, data->new_proc, bp) < 0) {
fail:
free(clone);
return CBS_STOP;