Debugger is much better, still has issues VMS921X_UPDATE

Post Reply
User avatar

Topic author
tlovern
Active Contributor
Posts: 40
Joined: Tue Jul 21, 2020 10:44 am
Reputation: 0
Status: Offline

Debugger is much better, still has issues VMS921X_UPDATE

Post by tlovern » Mon Aug 28, 2023 8:23 pm

Code: Select all

─ SRC: module TEST -scroll-source───────────────────────────────────────────────────────────────────────────────
  4433:         *anotherString;
  4434:
  4435: int     number;
  4436:
  4437: void doNothing(char *, char *, int);
  4438:
  4439: int main(int argc, char **argv)
  4440: {
  4441:
  4442:         randomString = "ABCDEF";
  4443:
  4444:         anotherString = "GHIJKL";
  4445:
  4446:         number = 1;
  4447:
  4448:
  4449:         printf ("\n%s%s [%d]", randomString, anotherString, number);
  4450:
  4451:         doNothing(randomString, anotherString, number);
  4452:
  4453:         exit (1);
  4454:
  4455: }
  4456:
  4457: void doNothing(char *one, char *two, int three)
  4458: {
  4459:
->4460:         printf("\n%s", one);
  4461:         printf("\n%s", two);
  4462:         printf("\n%d", three);
  4463:
  4464:         return;
─ OUT -output───────────────────────────────────────────────────────────────────────────────
break at routine TEST\main
break at routine TEST\doNothing
stepped to TEST\doNothing\%LINE 4457+8
stepped to TEST\doNothing\%LINE 4460




───────────────────────────────────────────────────────────────────────────────────
─ PROMPT -error-program-prompt───────────────────────────────────────────────────────
DBG> ex one
%DEBUG-E-NOSYMBOL, symbol 'one' is not in the symbol table
DBG> ex randomString
%DEBUG-E-NOSYMBOL, symbol 'randomString' is not in the symbol table
DBG>
───────────────────────────────────────────────────────────────────────────────────
In the above session, line numbers and breaks work as expected. Passed arguments and globals cannot be examined

full source listing of program:

Code: Select all


#include <stddef>
#include <stdlib>
#include <stdio>
#include <string>



char	*randomString,
	*anotherString;

int	number;

void doNothing(char *, char *, int);

int main(int argc, char **argv)
{

	randomString = "ABCDEF";

	anotherString = "GHIJKL";

	number = 1;


	printf ("\n%s%s [%d]", randomString, anotherString, number);

	doNothing(randomString, anotherString, number);

	exit (1);

}

void doNothing(char *one, char *two, int three)
{

	printf("\n%s", one);
	printf("\n%s", two);
	printf("\n%d", three);

	return;
}
output from program when run without debugging:

Code: Select all

$ r test.dbg/nodeb

ABCDEFGHIJKL [1]
ABCDEF
GHIJKL
1
Last edited by tlovern on Mon Aug 28, 2023 8:26 pm, edited 1 time in total.


jreagan
VSI Expert
Master
Posts: 141
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: Debugger is much better, still has issues VMS921X_UPDATE

Post by jreagan » Tue Aug 29, 2023 10:54 am

Some of that is with the compiler not emitting sufficient DWARF info. We're working on them now and hope to have a better compiler out soon. I'm make sure that your example is included in our testing.

Added in 1 hour 27 minutes 7 seconds:
Looking at the DWARF, I don't even see the compiler mentioning one, two, or three.

For randomString, I see that the compiler described it as RANDOMSTRING (which is the linker visible name). The internal compiler symbol table has the concept of multiple names "name for linker", "name for debugger", "name in machine code listing", etc. Looks like we called the wrong one.

I've put both into our compiler bug list.

User avatar

Topic author
tlovern
Active Contributor
Posts: 40
Joined: Tue Jul 21, 2020 10:44 am
Reputation: 0
Status: Offline

Re: Debugger is much better, still has issues VMS921X_UPDATE

Post by tlovern » Tue Aug 29, 2023 1:20 pm

great!

Thanks!


jreagan
VSI Expert
Master
Posts: 141
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: Debugger is much better, still has issues VMS921X_UPDATE

Post by jreagan » Fri Sep 22, 2023 8:27 am

We just fixed the bugs. Both the "optmized away" and the wrong case of some of the variable names.

Added in 5 minutes 11 seconds:
Didn't mention but both bugs were in the compiler, not the debugger. I'll get a new C compiler ready for update next week

Post Reply