[ANNOUNCEMENT] Updated: pv-1.3.9-1

Aaron Schneider notstop2@users.sourceforge.net
Thu Dec 6 21:13:00 GMT 2012


On 06/12/2012 19:05, Ken Brown wrote:
> This isn't the program you're trying to debug.  This file contains the
> debugging symbols.  You need to run gdb on pv.exe, as before; gdb will
> know to look in /usr/lib/debug/usr/bin/pv.exe.dbg for the symbols.
>

$ gdb pv
GNU gdb (GDB) 7.5.50.20120815-cvs (cygwin-special)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-cygwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/pv...Reading symbols from 
/usr/lib/debug/usr/bin/pv.exe.dbg...done.
done.
(gdb) break main.c:162
Breakpoint 2 at 0x401728: file 
/usr/src/debug/pv-1.3.9-1/src/main/main.c, line 162.
(gdb) start
Temporary breakpoint 3 at 0x4014b8: file 
/usr/src/debug/pv-1.3.9-1/src/main/main.c, line 44.
Starting program: /usr/bin/pv
[New Thread 130276.0x1fe8c]
[New Thread 130276.0x1fe90]

Temporary breakpoint 3, main (argc=1, argv=0x28ac60) at 
/usr/src/debug/pv-1.3.9-1/src/main/main.c:44
44                      return 1;
(gdb) s
31      {
(gdb) s
37              setlocale(LC_ALL, "");
(gdb) s
38              bindtextdomain(PACKAGE, LOCALEDIR);
(gdb) s
39              textdomain(PACKAGE);
(gdb) s
42              opts = opts_parse(argc, argv);
(gdb) s
opts_parse (argc=1, argv=0x28ac60) at 
/usr/src/debug/pv-1.3.9-1/src/main/options.c:51
51              struct option long_options[] = {
(gdb) s
49      {
(gdb) s
51              struct option long_options[] = {
(gdb) s
49      {
(gdb) s
51              struct option long_options[] = {
(gdb) s
78              int option_index = 0;
(gdb) s
84              opts = calloc(1, sizeof(*opts));
(gdb) s
85              if (!opts) {
(gdb) s
84              opts = calloc(1, sizeof(*opts));
(gdb) s
85              if (!opts) {
(gdb) s
93              opts->program_name = argv[0];
(gdb) s
96              opts->argv = calloc(argc + 1, sizeof(char *));
(gdb) s
95              opts->argc = 0;
(gdb) s
96              opts->argv = calloc(argc + 1, sizeof(char *));
(gdb) s
97              if (!opts->argv) {
(gdb) s
96              opts->argv = calloc(argc + 1, sizeof(char *));
(gdb) s
97              if (!opts->argv) {
(gdb) s
234                             opts->pidfile = optarg;
(gdb) s
109             opts->interval = 1;
(gdb) s
107             numopts = 0;
(gdb) s
234                             opts->pidfile = optarg;
(gdb) s
231                             opts->remote = pv_getnum_i(optarg);
(gdb) s
228                             opts->buffer_size = pv_getnum_ll(optarg);
(gdb) s
225                             opts->rate_limit = pv_getnum_ll(optarg);
(gdb) s
113                     c = getopt_long(argc, argv, /* RATS: ignore */
(gdb) s
119                     if (c < 0)
(gdb) s
113                     c = getopt_long(argc, argv, /* RATS: ignore */
(gdb) s
119                     if (c < 0)
(gdb) s
255             } while (c != -1);
(gdb) s
260             if (numopts == 0) {
(gdb) s
261                     opts->progress = 1;
(gdb) s
262                     opts->timer = 1;
(gdb) s
263                     opts->eta = 1;
(gdb) s
264                     opts->rate = 1;
(gdb) s
265                     opts->bytes = 1;
(gdb) s
272             if (opts->format) {
(gdb) s
320             while (optind < argc) {
(gdb) s
324             opts->exit_status = 0;
(gdb) s
326             return opts;
(gdb) s
327     }
(gdb) s
main (argc=1, argv=0x28ac60) at /usr/src/debug/pv-1.3.9-1/src/main/main.c:43
43              if (!opts)
(gdb) s
42              opts = opts_parse(argc, argv);
(gdb) s
43              if (!opts)
(gdb) s
45              if (opts->do_nothing) {
(gdb) s
50              if (opts->pidfile != NULL) {
(gdb) s
63              if (opts->remote > 0) {
(gdb) s
84              if (opts->argc == 0) {
(gdb) s
85                      opts->argv[opts->argc++] = "-";
(gdb) s
88              if (opts->size == 0) {
(gdb) s
89                      pv_calc_total_size(opts);
(gdb) s
pv_calc_total_size (opts=0x8003b660) at 
/usr/src/debug/pv-1.3.9-1/src/pv/file.c:43
43              opts->size = 0;
(gdb) s
46              if (opts->argc < 1) {
(gdb) s
43              opts->size = 0;
(gdb) s
46              if (opts->argc < 1) {
(gdb) s
53                      if (strcmp(opts->argv[i], "-") == 0) {
(gdb) s
54                              rc = fstat64(STDIN_FILENO, &sb);
(gdb) s
55                              if (rc != 0) {
(gdb) s
77                      if (S_ISBLK(sb.st_mode)) {
(gdb) s
96                      } else if (S_ISREG(sb.st_mode)) {
(gdb) s
99                              opts->size = 0;
(gdb) s
52              for (i = 0; i < opts->argc; i++) {
(gdb) s
103             if (!opts->linemode)
(gdb) s
159     }
(gdb) s
main (argc=1, argv=0x28ac60) at /usr/src/debug/pv-1.3.9-1/src/main/main.c:92
92              if (opts->size < 1)
(gdb) s
93                      opts->eta = 0;
(gdb) s
95              if ((isatty(STDERR_FILENO) == 0)
(gdb) s
101             if (opts->width == 0) {
(gdb) s
103                     tmpheight = opts->height;
(gdb) s
104                     pv_screensize(opts);
(gdb) s
pv_screensize (opts=0x8003b660) at 
/usr/src/debug/pv-1.3.9-1/src/pv/display.c:30
30      {
(gdb) s
34              if (isatty(STDERR_FILENO)) {
(gdb) s
35                      if (ioctl(STDERR_FILENO, TIOCGWINSZ, &wsz) == 0) {
(gdb) s
36                              opts->width = wsz.ws_col;
(gdb) s
37                              opts->height = wsz.ws_row;
(gdb) s
41      }
(gdb) s
main (argc=1, argv=0x28ac60) at 
/usr/src/debug/pv-1.3.9-1/src/main/main.c:105
105                     if (tmpheight > 0)
(gdb) s
109             if (opts->height == 0) {
(gdb) s
120             if (opts->width < 1)
(gdb) s
123             if (opts->height < 1)
(gdb) s
126             if (opts->width > 999999)
(gdb) s
129             if (opts->height > 999999)
(gdb) s
135             if (opts->interval < 0.1)
(gdb) s
137             if (opts->interval > 600)
(gdb) s
157             tcgetattr(STDERR_FILENO, &t);
(gdb) s
158             t_save = t;
(gdb) s
160             tcsetattr(STDERR_FILENO, TCSANOW, &t);
(gdb) s
158             t_save = t;
(gdb) s
159             t.c_lflag |= TOSTOP;
(gdb) s
158             t_save = t;
(gdb) s
160             tcsetattr(STDERR_FILENO, TCSANOW, &t);
(gdb) s

Breakpoint 2, main (argc=1, argv=0x28ac60) at 
/usr/src/debug/pv-1.3.9-1/src/main/main.c:162
162             opts->current_file = "(stdin)";
(gdb) s
164             pv_sig_init();
(gdb) s
pv_sig_init () at /usr/src/debug/pv-1.3.9-1/src/pv/signal.c:158
158             sigemptyset(&(sa.sa_mask));
(gdb) s
157             sa.sa_handler = SIG_IGN;
(gdb) s
147             pv__sig_old_stderr = -1;
(gdb) s
148             pv__sig_tstp_time.tv_sec = 0;
(gdb) s
149             pv__sig_tstp_time.tv_usec = 0;
(gdb) s
150             pv_sig_toffset.tv_sec = 0;
(gdb) s
151             pv_sig_toffset.tv_usec = 0;
(gdb) s
158             sigemptyset(&(sa.sa_mask));
(gdb) s
160             sigaction(SIGPIPE, &sa, NULL);
(gdb) s
159             sa.sa_flags = 0;
(gdb) s
160             sigaction(SIGPIPE, &sa, NULL);
(gdb) s
167             sigemptyset(&(sa.sa_mask));
(gdb) s
166             sa.sa_handler = pv__sig_ttou;
(gdb) s
167             sigemptyset(&(sa.sa_mask));
(gdb) s
169             sigaction(SIGTTOU, &sa, NULL);
(gdb) s
168             sa.sa_flags = 0;
(gdb) s
169             sigaction(SIGTTOU, &sa, NULL);
(gdb) s
176             sigemptyset(&(sa.sa_mask));
(gdb) s
175             sa.sa_handler = pv__sig_tstp;
(gdb) s
176             sigemptyset(&(sa.sa_mask));
(gdb) s
178             sigaction(SIGTSTP, &sa, NULL);
(gdb) s
177             sa.sa_flags = 0;
(gdb) s
178             sigaction(SIGTSTP, &sa, NULL);
(gdb) s
186             sigemptyset(&(sa.sa_mask));
(gdb) s
185             sa.sa_handler = pv__sig_cont;
(gdb) s
186             sigemptyset(&(sa.sa_mask));
(gdb) s
188             sigaction(SIGCONT, &sa, NULL);
(gdb) s
187             sa.sa_flags = 0;
(gdb) s
188             sigaction(SIGCONT, &sa, NULL);
(gdb) s
195             sigemptyset(&(sa.sa_mask));
(gdb) s
194             sa.sa_handler = pv__sig_winch;
(gdb) s
195             sigemptyset(&(sa.sa_mask));
(gdb) s
197             sigaction(SIGWINCH, &sa, NULL);
(gdb) s
196             sa.sa_flags = 0;
(gdb) s
197             sigaction(SIGWINCH, &sa, NULL);
(gdb) s
204             sigemptyset(&(sa.sa_mask));
(gdb) s
203             sa.sa_handler = pv__sig_term;
(gdb) s
204             sigemptyset(&(sa.sa_mask));
(gdb) s
206             sigaction(SIGINT, &sa, NULL);
(gdb) s
205             sa.sa_flags = 0;
(gdb) s
206             sigaction(SIGINT, &sa, NULL);
(gdb) s
209             sigemptyset(&(sa.sa_mask));
(gdb) s
208             sa.sa_handler = pv__sig_term;
(gdb) s
209             sigemptyset(&(sa.sa_mask));
(gdb) s
211             sigaction(SIGHUP, &sa, NULL);
(gdb) s
210             sa.sa_flags = 0;
(gdb) s
211             sigaction(SIGHUP, &sa, NULL);
(gdb) s
214             sigemptyset(&(sa.sa_mask));
(gdb) s
213             sa.sa_handler = pv__sig_term;
(gdb) s
214             sigemptyset(&(sa.sa_mask));
(gdb) s
216             sigaction(SIGTERM, &sa, NULL);
(gdb) s
215             sa.sa_flags = 0;
(gdb) s
216             sigaction(SIGTERM, &sa, NULL);
(gdb) s
217     }
(gdb) s
main (argc=1, argv=0x28ac60) at 
/usr/src/debug/pv-1.3.9-1/src/main/main.c:166
166             pv_remote_init(opts);
(gdb) s
pv_remote_init (opts=0x8003b660) at 
/usr/src/debug/pv-1.3.9-1/src/main/remote.c:261
261             remote__msgid = remote__msgget(opts);
(gdb) s
remote__msgget (opts=<optimized out>) at 
/usr/src/debug/pv-1.3.9-1/src/main/remote.c:80
80              return msgget(remote__genkey(opts), IPC_CREAT | 0600);
(gdb) s
remote__genkey (opts=<optimized out>) at 
/usr/src/debug/pv-1.3.9-1/src/main/remote.c:64
64              uid = geteuid();
(gdb) s
68              key = ftok("/tmp", 'P') | uid;
(gdb) s
64              uid = geteuid();
(gdb) s
68              key = ftok("/tmp", 'P') | uid;
(gdb) s
remote__msgget (opts=<optimized out>) at 
/usr/src/debug/pv-1.3.9-1/src/main/remote.c:80
80              return msgget(remote__genkey(opts), IPC_CREAT | 0600);
(gdb) s
remote__genkey (opts=<optimized out>) at 
/usr/src/debug/pv-1.3.9-1/src/main/remote.c:68
68              key = ftok("/tmp", 'P') | uid;
(gdb) s
remote__msgget (opts=<optimized out>) at 
/usr/src/debug/pv-1.3.9-1/src/main/remote.c:80
80              return msgget(remote__genkey(opts), IPC_CREAT | 0600);
(gdb) s

Program received signal SIGSYS, Bad system call.
0x00000000 in ?? ()
(gdb)


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list