Can't make breakpoint with dbx

Can't make breakpoint with dbx

Post by Trans Seo » Sat, 15 Feb 2003 17:07:23



Hi.
i tried dbx but i couldn't set break point.
in fact my dbx doesn't have "break" command.. but only "stop" i think.

when i tried "stop at 29" there is error - beyond end of file at line
"timegap.cpp":29

but when i tested simple code (like helloworld.cpp) it works!
more setting is required?
this code requires input file and i used 3C++std String.. is there
something wrong?

this is part of my source code and what i tried.
Thanks.

--
dbx timegap
dbx version 3.11.10
Type 'help' for help.

main:  23  if (argc <= 1)
(dbx) w
    19  void main(int argc, char *argv[])
    20  {
    21          int file_count;
    22  

Quote:>   23          if (argc <= 1)

    24          {
    25                  cout << "need filename" << endl;
    26                  return;
    27          }
    28  
    29          for (file_count = 1; file_count < argc; file_count++)
    30          {
    31                  ifstream is(argv[file_count]);
    32                  if (!is.is_open())
    33                  {
    34                          cout << "file open error." << endl;
    35                          return;

(dbx) stop at 29
beyond end of file at line "timegap.cpp":29
(dbx) run jh1.log
----- Searching jh1.log ... -----

Program terminated normally

(dbx)