git://git.jankratochvil.net
/
debugger.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c4d096d
)
Fixup the dwfl_end () cleanup.
author
lace
<>
Wed, 16 May 2007 17:17:32 +0000
(17:17 +0000)
committer
lace
<>
Wed, 16 May 2007 17:17:32 +0000
(17:17 +0000)
Makefile
patch
|
blob
|
history
debugger.c
patch
|
blob
|
history
threadtest.c
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
8065c65
..
09d6610
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-15,6
+15,8
@@
testsuite: testsuite.c debugger.c debugger.h
threadtest: threadtest.c
$(CC) -o $@ $< $(LIBS)
threadtest: threadtest.c
$(CC) -o $@ $< $(LIBS)
+ ./$@ single
+ ./$@ multi
.PHONY: check
check: testsuite
.PHONY: check
check: testsuite
@@
-30,5
+32,5
@@
still:
.PHONY: clean
clean:
.PHONY: clean
clean:
- $(RM) debugger testsuite
+ $(RM) debugger testsuite
threadtest
diff --git
a/debugger.c
b/debugger.c
index
add07f9
..
ec5b60c
100644
(file)
--- a/
debugger.c
+++ b/
debugger.c
@@
-335,8
+335,6
@@
static Dwfl *get_dwfl (struct ps_prochandle *proc_handle)
|| dwfl_report_end (proc_handle->dwfl, NULL, NULL) != 0)
{
fprintf (stderr, "dwfl reporting: %m\n");
|| dwfl_report_end (proc_handle->dwfl, NULL, NULL) != 0)
{
fprintf (stderr, "dwfl reporting: %m\n");
- dwfl_end (proc_handle->dwfl);
- proc_handle->dwfl = NULL;
abort ();
}
}
abort ();
}
}
diff --git
a/threadtest.c
b/threadtest.c
index
63ea31c
..
971e940
100644
(file)
--- a/
threadtest.c
+++ b/
threadtest.c
@@
-300,14
+300,16
@@
static void attach (pid_t pid)
err = td_ta_new (&proc_handle_local, &thread_agent);
assert (err == TD_OK || err == TD_NOLIBTHREAD);
if (err == TD_NOLIBTHREAD)
err = td_ta_new (&proc_handle_local, &thread_agent);
assert (err == TD_OK || err == TD_NOLIBTHREAD);
if (err == TD_NOLIBTHREAD)
+ puts ("singlethreaded");
+ else
{
{
- puts ("singlethreaded");
- return;
+ puts ("multithreaded");
+ thread_test (thread_agent);
+ err = td_ta_delete (thread_agent);
+ assert (err == TD_OK);
}
}
- puts ("multithreaded");
- thread_test (thread_agent);
- err = td_ta_delete (thread_agent);
- assert (err == TD_OK);
+ if (proc_handle_local.dwfl != NULL);
+ dwfl_end (proc_handle_local.dwfl);
}
static void *start (void *arg)
}
static void *start (void *arg)