- 论坛徽章:
- 0
|
GDB调试的时候实际执行的语句和GDB打印出来的语句不一致,请高手指点一下原因
[back@DevXY01 bin]$ gdb ./bpostsupply -d ../qs_qscl/ -d ../qs_qslib/
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-45.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
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 "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /home/back/batch/bin/bpostsupply...done.
(gdb) b IPOLot
Breakpoint 1 at 0x8139979: file ipopost.cpp, line 85.
(gdb) r
Starting program: /home/back/batch/bin/bpostsupply
[Thread debugging using libthread_db enabled]
[DBS][USERNAME][back]
[DBS][PASSWORD][76c959f0d40336b4]
[DBS][DBNAME][ksdbs]
[DBS][SERVER][test]
[CLR_PROCESS_CONTROL][CLR_PROCESS_CONTROL][0]
Breakpoint 1, IPOLot (pPostDate=0xffffd72b "20160126", pMsg=0xffffccb4 "") at ipopost.cpp:85
85 double dMaxWithdraw = 0;
(gdb) list
80 int iErrCode = 0;
81 long lSerialNo = 0;
82 double dLotAmtSum = 0;
83 double dCustAmtSum = 0;
84 double dDoneAmtSum = 0;
85 double dMaxWithdraw = 0;
86 double dDoneAmt = 0;
87 char sErrCode[10] = {0};
88 char sMsg[256] = {0};
89 char sRealSerial[13] = {0};
(gdb)
90
91 ST_IPO_TOTAL struipo_total_in = {0};
92 ST_IPO_TOTAL struipo_total_out = {0};
93 LPIPO_TOTAL point = (LPIPO_TOTAL)NULL;
94 fund_stk_chg_fc rt = {0};
95 fund_stk_chg_fc stAmendFc = {0};
96 ST_CUSTFUNDINFO strucust_fund_info = {0};
97
98 iPostDate = atoi(pPostDate);
99
(gdb)
100 strcpy(struipo_total_in.scust_no, g_postfund.sCustNo);
101 struipo_total_in.isettle_date = iPostDate;
102
103 /*
104 *
105 */
106 if (FALSE == g_cipo_total.Sum(&struipo_total_in, &dLotAmtSum, &dCustAmtSum, pMsg))
107 {
108 if (strcmp(pMsg, "") == 0)
109 {
(gdb) n
86 double dDoneAmt = 0;
(gdb)
87 char sErrCode[10] = {0};
(gdb)
程序本来是从第80行开始执行的,但是单步调试时GDB显示执行的代码是第85 行 的代码;
已经试过 cleanall 重编译,不管用;而且也不是 换行符的问题,代码里面没有 ^M 的。
请问怎样才能解决这个问题啊?求高手解答 |
|