Using XEP80 to debug programs

Using XEP80 to debug programs

Post by Mathy van Nisselro » Tue, 09 Apr 2002 23:59:26



Howdy folks

A few days ago, I had the following idea.  Don't know if it's worth the
hassle, but I own 3 XEP80's so...
Anybody ever tried to use an XEP80 as a second screen, to debug his/her
programming?  To print out the values of some variables in a way that it
doesn't mess up your normal screen output???

CU                    Mathy van Nisselroy

--
---
My old email address will cease to exist as of the end of 2001, please use
my new address.
Meine alte Emailadresse wird Ende 2001 geloescht, bitte benutzen Sie meine
neue Adresse.
Mijn oude Emailadress wordt eind 2001 opgeheven,  gebruikt aub vanaf nu mijn
nieuwe adres.

http://www-users.rwth-aachen.de/mathy.van_nisselroy

 
 
 

Using XEP80 to debug programs

Post by David A Paters » Wed, 10 Apr 2002 08:50:11




Quote:>Howdy folks

>A few days ago, I had the following idea.  Don't know if it's worth the
>hassle, but I own 3 XEP80's so...
>Anybody ever tried to use an XEP80 as a second screen, to debug his/her
>programming?  To print out the values of some variables in a way that it
>doesn't mess up your normal screen output???

>CU                    Mathy van Nisselroy

Should be possible; I seem to recall an Antic article by Dave and Sandy Small
talking about the same idea - using a Bit 3 80 column board (plugged into RAM
slot #3 on an 800) for debugging to maintain the screen display.

Possible problems:

- driver conflicts - if the XEP80 driver uses memory locations needed by your
program

- interrupt conflicts - the XEP80 is picky about its data stream, I seem to
recall.

But good luck with this project!

David P.

 
 
 

Using XEP80 to debug programs

Post by Rick D » Fri, 12 Apr 2002 14:47:22



> Howdy folks

> A few days ago, I had the following idea.  Don't know if it's worth the
> hassle, but I own 3 XEP80's so...
> Anybody ever tried to use an XEP80 as a second screen, to debug his/her
> programming?  To print out the values of some variables in a way that it
> doesn't mess up your normal screen output???

> CU                    Mathy van Nisselroy

Programs with Trace probably map to the standard screen handler.  Changing this
is probably hard.

Easier to send your programs output to the second screen, use the main for
debug.  But, it would probably have to be plain text.

I just end up adding my own print statements, on screen or send them to the
printer.

Rick D.

 
 
 

Using XEP80 to debug programs

Post by Mathy van Nisselro » Sat, 13 Apr 2002 21:27:12


Howdy Rick, folks

Quote:> Programs with Trace probably map to the standard screen handler.  Changing
this
> is probably hard.

> Easier to send your programs output to the second screen, use the main for
> debug.  But, it would probably have to be plain text.

> I just end up adding my own print statements, on screen or send them to
the
> printer.

I was thinking more along the line of displaying the contents of variables
on the XEP80's screen.  Or let's say you're not sure if the IF THEN (in
BASIC, in other languages there are simular conditional
jumps/goto's/gosub's) is working as you had intended them to work.  With the
XEP80 you'ld have 24 lines of 80 characters EXTRA to put stuff on.  You
could display lot's of variables and lot's of line numbers on ONE screen
without it messing up the output to your normal screen (the stuff the user
get's to see) or your data scrolling off the screen/being written over.

CU                                Mathy van Nisselroy

 
 
 

1. Using gdb to debug...


|> Could someone give me a quick "tutorial" on using gdb to debug programs
|> under MiNT?  And possibly point me in the direction of some gdb
|> documentation (I don't really want to have to ftp > 3M of tar.gz source
|> code from prep.ai.mit.edu)?

In the binary distribution (gdb36p4b.zoo), there is a file gdb.info, a
plain text file (with some control character), which is the infoized
version of gdb.texi. There are no ST specific descriptions inside, but
the only real difference between the Unix and the ST version is that
on the ST gdb cannot read the symbol table from the executable, but
uses a separate file made with sym-ld.

|> I'm working under MiNT 1.09, using GCC 2.4.5, MiNTlibs pl ~41, and I've
|> got the MiNT port of gdb...

|> Will I be able to run the program in one TOSWIN window and run gdb on it
|> in another one?  It's a curses application (well, ok, it's a port of the
|> Angband 2.5.3 beta code) so I don't want to run it all in one window.

Yes, you can use the attach command to debug any process after telling
gdb which are the exec and symbol files. The only tricky part is to
attach to the process before it crashes...

|> The port is experiencing some problems; at this point, I just want
|> something like a function call dump when the app crashes.  I'm getting
|> BUS ERRORs at a certain point, after another bug surfaces, and I think
|> the function call trace might help... what I'm hoping gdb will be able
|> to give me is something like this:

|> angband.ttp:
|> ___main:
|> __main:
|> _main:
|> ...
|> _save_file:
|> _fputc:
|> BUS ERROR

|> Those *mains would be in whatever order they're called in...

Use the backtrace command (can be abbrevated to bt).

|> Am I hoping for too much in gdb?  I'm building with no optimisation, and
|> -g... do I need to do anything else to use gdb on the app?

You can also use -O, but *not* -fomit-frame-pointer.  Make sure that
the symbol file is linked the same way as the exec file, e.g. by using

foo.sym: $(objs)
        gcc -B/gnu/bin/sym- -o foo.sym $(objs)
              ^^^^^^^^ substitute the path to sym-ld here

in the Makefile.

--
----------------------------------------------------------------------
Andreas Schwab                                  "And now for something

2. searching for FTP client that supports "STR O VMS"

3. GDB and debugging C++ programs

4. DECnet-VAX extension for VMS V5.5

5. Debugging Sozobon C Programs

6. Where are the passwords?

7. Debugging C++ programs **HELP!!!**

8. Mailing List

9. VT100 terminal emulator uses XEP80!

10. Anyone program something that uses 2600 driving controllers?

11. Saftware to run 8 bit programs on a PC using Xformer 3.0a

12. Using basic programs with say... XL-it?

13. Using Atari Programs from the net on a Real Atari