This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] to avoid objdump hangs
- From: Salvador Eduardo Tropea <salvador at inti dot gov dot ar>
- To: binutils at sources dot redhat dot com
- Date: Fri, 02 May 2003 11:41:06 -0300
- Subject: [PATCH] to avoid objdump hangs
Hi All!
This is my first post to the list, sorry if I´m doing in the wrong way.
Problem: objdump -g can hang in an infinite loop.
Verion: CVS, also 2.13 and 2.12 shows the same problem.
Solution:
It looks like that´s a "circular debug information" issue, but the code
to detect it in debug.c isn´t enough. The following patch solves the
problem:
Index: debug.c
===================================================================
RCS file: /cvs/src/src/binutils/debug.c,v
retrieving revision 1.9
diff -u -r1.9 debug.c
--- debug.c 13 Feb 2003 10:32:46 -0000 1.9
+++ debug.c 2 May 2003 14:37:06 -0000
@@ -2183,7 +2183,7 @@
for (l = list; l != NULL; l = l->next)
{
- if (l->t == type)
+ if (l->t == type || l == l->next)
{
fprintf (stderr,
_("debug_get_real_type: circular debug information
for %s\n"),
************** End of patch
I attached the patch in case the mailer destroys the above version.
I found it while trying to generate the debug info for my setedit
(http://setedit.sf.net/) project which is quite big.
SET
--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: set@computer.org set@ieee.org
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013
Index: debug.c
===================================================================
RCS file: /cvs/src/src/binutils/debug.c,v
retrieving revision 1.9
diff -u -r1.9 debug.c
--- debug.c 13 Feb 2003 10:32:46 -0000 1.9
+++ debug.c 2 May 2003 14:38:46 -0000
@@ -2183,7 +2183,7 @@
for (l = list; l != NULL; l = l->next)
{
- if (l->t == type)
+ if (l->t == type || l == l->next)
{
fprintf (stderr,
_("debug_get_real_type: circular debug information for %s\n"),