From: ravi@cs.wpi.edu (Ravi Narayan)
Newsgroups: comp.windows.x.motif,comp.windows.x
Subject: Help with mxgdb 1.1.4
Date: 19 Dec 1992 22:26:10 GMT
Organization: Woopie Tech
Distribution: world
Reply-To: ravi@cs.wpi.edu
NNTP-Posting-Host: ivy.wpi.edu


    hi,

    i was wondering if someone could help me with this problem.

    i downloaded a copy of mxgdb-1.1.4 from sunsite.unc.edu. i tried
    compiling it on my system:

    Sun 4/110, SunOs 4.1.1, X11R4, Motif 1.1, gcc 2.0, gdb 4.4.

    i had some problems witht he imake gerenated makefile: i had to
    change the CC to gcc in the Makefile (setting it in the Imakefile
    didnt seem to work). the X libraries also had to be specified
    manually since none of them were getting linked.

    when i changed these, compiled (the only DEFINES i used was
    -DHAVE_TERMIO) and executed mxgdb i had/have three main problems:

    1. the source file is not displayed in the source window.
    2. before i get the output from the program (when i run it) i get
       the error:
       [ioctl TIOCSPGRP failed in terminal_inferior: Inappropriate ioctl
       for device]
       when i open up the Xtty the error disappears but the output does
       not appear in the tty.
    3. i get all these 8-bit characters and constant beeps in the gdb
       window.

    of these problems i would be more than happy if i could just fix the
    first. without source code display the program is not of much use to
    me. i tried tweaking the x-defaults colours in case foreground and
    background were set to be the same, but as could be expected, that
    wasnt the problem.

    i wrote a small test program (tst.c) and tried mxgdb -debug on it.
    the program and the debug output are given below.

    thanks for all help,

    - ravi


-------------- test program compiled with gcc -g --------------------------


main()
{
    int i;

    for(i=0; i<10; i++)
    {
    prnt(i);
    }

    exit(0);

}

prnt(i)
int i;
{
   printf("This is test message %d\n", i);
}


----------------------------- mxgdb -debug output ---------------------------

Script started on Sat Dec 19 15:44:40 1992
[3:44pm]donald:tmp> mxgdb -debug tst

=>GDB is free software and you are welcome to distribute copies of it
=> under certain conditions; type "show copying" to see the conditions.
=>There is absolutely no warranty for GDB; type "show warranty" for details.
=>GDB 4.4, Copyright 1991 Free Software Foundation, Inc...=>
=>(gdb) parse(output = GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.4, Copyright 1991 Free Software Foundation, Inc...
, command = )
>>set height 0
=>set height 0
=>(gdb) parse(output = set height 0
, command = set height 0
)
>>set print pretty
=>set print pretty
=>(gdb) parse(output = set print pretty
, command = set print pretty
)
>>show directories
=>show directories
=>Source directories searched: $cdir:$cwd
=>(gdb) parse(output = show directories
Source directories searched: $cdir:$cwd
, command = show directories
)
>>list ,main
=>list ,main
=>1       
=>2       
=>3       
=>4       main()
=>5       {
=>(gdb) parse(output = list ,main
1       
2       
3       
4       main()
5       {
, command = list ,main
)
>>info line
=>info line
=>Line 5 of "tst.c" starts at pc 0x2290 and ends at 0x229c.
=>(gdb) parse(output = info line
Line 5 of "tst.c" starts at pc 0x2290 and ends at 0x229c.
, command = info line
)
>>info line
=>info line
=>Line 6 of "tst.c" is at pc 0x229c but contains no code.
=>(gdb) parse(output = info line
Line 6 of "tst.c" is at pc 0x229c but contains no code.
, command = info line
)
>>display
=>display
=>(gdb) parse(output = display
, command = display
)
>>tty /dev/ttyp6
=>t=>ty /dev/ttyp6
=>(gdb) parse(output = tty /dev/ttyp6
, command = tty /dev/ttyp6
)
>>break main
=>break main
=>Breakpoint 1 at 0x229c: file tst.c, line 8.
=>(gdb) parse(output = break main
Breakpoint 1 at 0x229c: file tst.c, line 8.
, command = break main
)
>>run
=>r=>u=>n
=>Starting program: /users/csgrads1/mick/tmp/tst 
=>
=>Breakpoint 1, main () at tst.c:8
=>/users/csgrads1/mick/tmp/tst.c:8:24:beg:0x229c
=>(gdb) parse(output = run
Starting program: /users/csgrads1/mick/tmp/tst 

Breakpoint 1, main () at tst.c:8
/users/csgrads1/mick/tmp/tst.c:8:24:beg:0x229c
, command = run
)
>>info break
=>info break
=>    Enb   Address    Where
=>#1   y  0x0000229c  in main at tst.c:8
=>(gdb) parse(output = info break
    Enb   Address    Where
#1   y  0x0000229c  in main at tst.c:8
, command = info break
)
>>frame
=>frame
=>#0  main () at tst.c:8
=>/users/csgrads1/mick/tmp/tst.c:8:24:beg:0x229c
=>(gdb) parse(output = frame
#0  main () at tst.c:8
/users/csgrads1/mick/tmp/tst.c:8:24:beg:0x229c
, command = frame
)
>>step
=>step
=>/users/csgrads1/mick/tmp/tst.c:10:54:beg:0x22b0
=>(gdb) parse(output = step
/users/csgrads1/mick/tmp/tst.c:10:54:beg:0x22b0
, command = step
)
>>info break
=>info break
=>    Enb   Address    Where
=>#1   y  0x0000229c  in main at tst.c:8
=>(gdb) parse(output = info break
    Enb   Address    Where
#1   y  0x0000229c  in main at tst.c:8
, command = info break
)
>>frame
=>frame
=>#0  main () at tst.c:10
=>/users/csgrads1/mick/tmp/tst.c:10:54:beg:0x22b0
=>(gdb) parse(output = frame
#0  main () at tst.c:10
/users/csgrads1/mick/tmp/tst.c:10:54:beg:0x22b0
, command = frame
)
>>quit
=>q=>u=>i=>t=>
=>The program is running.  Quit anyway? (y or n) >>y
=>y
[3:45pm]donald:tmp> exit
exit

script done on Sat Dec 19 16:39:33 1992