From b0f66784a8a6fff0708c7ffd4931bff519869541 Mon Sep 17 00:00:00 2001 From: MaartenBrock Date: Tue, 13 Jun 2006 12:49:43 +0000 Subject: [PATCH 1/1] * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and 1208515 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4224 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 5 +++++ debugger/mcs51/cmd.c | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c6a0511b..ae4ec7a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-06-13 Maarten Brock + + * debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and + 1208515 + 2006-06-13 Vangelis Rokas * src/port.h (struct PORT): added field gp_tags, to hold the tag diff --git a/debugger/mcs51/cmd.c b/debugger/mcs51/cmd.c index 6bfe2b11..fef7d6dc 100644 --- a/debugger/mcs51/cmd.c +++ b/debugger/mcs51/cmd.c @@ -1723,9 +1723,7 @@ int cmdListFunctions (char *s, context *cctxt) printf("[functions]\n"); f = setFirstItem(functions); i = 0; - for (;;) { - if (f == NULL) - break; + while (f != NULL) { if (our_verbose) { printf(" %d) sym:%p, fname:%s, modName:%s, mod:%p\n", i, f->sym, f->sym->name, f->modName, f->mod); @@ -1735,7 +1733,7 @@ int cmdListFunctions (char *s, context *cctxt) f->cfpoints, f->afpoints, f->laddr, f->lline); } else { - printf("<%s>", f->modName); + printf("<%s>", f->sym->name); } ++i; f = setNextItem(functions); @@ -1745,7 +1743,7 @@ int cmdListFunctions (char *s, context *cctxt) } /*----------------------------------------------------------------- - cmdListModules - list functions. + cmdListModules - list modules. |-----------------------------------------------------------------*/ int cmdListModules (char *s, context *cctxt) { -- 2.30.2