]> git.gag.com Git - fw/sdcc/blobdiff - debugger/mcs51/cmd.c
* debugger/mcs51/cmd.c (cmdListFunctions): fixed bugs 1181163 and 1208515
[fw/sdcc] / debugger / mcs51 / cmd.c
index 6bfe2b11e9bbe40ead804d5566e773338cff6d40..fef7d6dc629f1a0e4504dbbe6533ece2384a8e9e 100644 (file)
@@ -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)
 {