diff options
author | Petr Machata <pmachata@redhat.com> | 2012-04-15 04:22:39 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-04-19 01:38:05 +0200 |
commit | 218c5ff26841f5bbd188c42ccbd67422a7a20556 (patch) | |
tree | 1fd0e5cd8b45c90c29dd440eee7d5257270812dc /breakpoints.c | |
parent | 051dffaf54d2e049487bc884f3fa4346444be865 (diff) | |
download | ltrace-218c5ff26841f5bbd188c42ccbd67422a7a20556.tar.gz |
Nits
Diffstat (limited to 'breakpoints.c')
-rw-r--r-- | breakpoints.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/breakpoints.c b/breakpoints.c index ab61bf2..8668e77 100644 --- a/breakpoints.c +++ b/breakpoints.c @@ -161,9 +161,6 @@ breakpoint_clone(struct breakpoint *retp, struct Process *new_proc, int breakpoint_turn_on(struct breakpoint *bp, struct Process *proc) { - /* Make sure it was inserted. XXX In a clean world, we would - * have breakpoint_site representing a place and breakpoint - * representing inserted breakpoint. */ bp->enabled++; if (bp->enabled == 1) { assert(proc->pid != 0); @@ -196,13 +193,7 @@ insert_breakpoint(struct Process *proc, void *addr, debug(DEBUG_FUNCTION, "insert_breakpoint(pid=%d, addr=%p, symbol=%s)", proc->pid, addr, libsym ? libsym->name : "NULL"); - if (addr == 0) { - /* XXX we need a better way to deal with this. For - * now, just abuse errno to carry the error - * information. */ - errno = EINVAL; - return NULL; - } + assert(addr != 0); /* XXX what we need to do instead is have a list of * breakpoints that are enabled at this address. The |