Results 1 to 1 of 1
  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Talking Unanswered: how to debug in Unix C

    I'm developing a C project under UNIX, and i would like to know a
    good way to debug my program. As can see below when I tried the options which I read from the internet it is not working. I actually want to see how is the flow of the program line by line as it debugs the program so I can understand how the program is working. Please help me. If u help me your rewards will be great one day...


    01amy03 #>cc -g rate biosratingtest.c
    (Bundled) cc: warning 480: The -g option is available only with the C/ANSI C product; ignored.
    /usr/ccs/bin/ld: rate: Not a valid object file (invalid magic number)
    s01amy03 #>cc -ggdb rate biosratingtest.c
    (Bundled) cc: warning 480: The -g option is available only with the C/ANSI C product; ignored.
    (Bundled) cc: warning 480: The -g option is available only with the C/ANSI C product; ignored.
    (Bundled) cc: warning 480: The -d option is available only with the C/ANSI C product; ignored.
    /usr/ccs/bin/ld: rate: Not a valid object file (invalid magic number)
    s01amy03 #>cc -gcc rate biosratingtest.c
    (Bundled) cc: warning 480: The -g option is available only with the C/ANSI C product; ignored.
    s01amy03 #>g++ -g biosratingtest.c
    sh: g++: not found.
    s01amy03 #>cc -gdb rate biosratingtest.c
    (Bundled) cc: warning 480: The -g option is available only with the C/ANSI C product; ignored.
    (Bundled) cc: warning 480: The -d option is available only with the C/ANSI C product; ignored.
    /usr/ccs/bin/ld: rate: Not a valid object file (invalid magic number)
    s01amy03 #>cc -ddd rate biosratingtest.c
    (Bundled) cc: warning 480: The -d option is available only with the C/ANSI C product; ignored.
    /usr/ccs/bin/ld: rate: Not a valid object file (invalid magic number)
    s01amy03 #>cc -xxgdb rate biosratingtest.c
    (Bundled) cc: warning 422: Unknown option "x" ignored.
    (Bundled) cc: warning 422: Unknown option "x" ignored.
    (Bundled) cc: warning 480: The -g option is available only with the C/ANSI C product; ignored.
    (Bundled) cc: warning 480: The -d option is available only with the C/ANSI C product; ignored.
    /usr/ccs/bin/ld: rate: Not a valid object file (invalid magic number)
    Last edited by franco6571; 03-23-04 at 19:32.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •