[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | Digital Ladebug debugger |
|
Moderator: | TLE::LUCIA |
|
Created: | Fri Feb 28 1992 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 969 |
Total number of notes: | 3959 |
883.0. "Function arg type changes after I step into the function." by GALVIA::STONES (Tom Stones) Thu Mar 13 1997 05:13
I'm debugging a C++ code which includes the bits of source shown below. One of the
overloaded member functions called RCS_T::GetEmptyBufForSend
has an argument of type imc_block_t. I build a shared library including these
functions and call them from a main module that declares variables of type imc_block_t
and passes them as arguments to RCS_T::GetEmptyBufForSend.
The problem is that ladebug shows the argument type properly before I enter the
function, but shows the wrong arg type when inside the function. The type imc_lkinfo
appears in the header file that declares type imc_block_t, but is not used at all in my
code (although it is used in libimc.a which is linked into my library).
Here's what ladebug did:
...
(ladebug)
stopped at [void Sender(void):65 0x120002f58]
65 status = rcs1->GetEmptyBufForSend(sndWakeH, sndEP, &b1, &index1);
(ladebug) whatis sndWakeH
unsigned long sndWakeH
(ladebug) whatis RCS_t::GetEmptyBufForSend
int RCS_t::GetEmptyBufForSend(imc_block_t, MCMEPADDR&, BufId_t*, int*)
(ladebug) s
stopped at [int RCS_t::GetEmptyBufForSend(imc_lkinfo, MCMEPADDR&, BufId_t*, int*):351
0x3ffbffe83c0]
351 lock.ClusterLock(&(txRCS->lock));
(ladebug) whatis RCS_t::GetEmptyBufForSend
int RCS_t::GetEmptyBufForSend(imc_lkinfo, MCMEPADDR&, BufId_t*, int*)
(ladebug) t
>0 0x3ffbffe83c0 in ((RCS_t*)0x10000)->GetEmptyBufForSend(senderWakeHandle=<opaque>
bits = , sendAdr={ ... }, bufId=0x11ffff960, index=0x11ffff940) ./rcs.cxx:351
#1 0x120002f70 in Sender() rcstest.cxx:65
#2 0x1200030ec in main(argc=1, argv=0x11ffff9e8) rcstest.cxx:84
(ladebug) p senderWakeHandle
<opaque> bits =
(ladebug)
Here are extracts form the source:
imc.h:
...
extern "C" {
...
typedef long imc_key_t;
typedef long imc_size_t;
typedef int imc_perm_t;
typedef int imc_dir_t;
typedef struct imc_lkinfo *imc_lkid_t; <<<--- Not used.
typedef int imc_asid_t;
typedef int imc_mcid_t;
typedef struct {
int num;
char name[IMC_MAXHOSTS][MAXHOSTNAMELEN];
} imc_hostinfo;
typedef unsigned long imc_block_t; <<<--- Used
...
rcs.h:
...
#include imc.h
...
class RCS_t {
...
public:
...
int GetEmptyBufForSend(MCMEPADDR &sendAdr, BufId_t *bufId, int *index);
int GetEmptyBufForSend(imc_block_t senderWakeHandle,
MCMEPADDR &sendAdr, BufId_t *bufId, int *index);
...
rcs.cxx:
...
#include "rcs.h"
#include "imc.h"
...
inline int RCS_t::GetEmptyBufForSend(MCMEPADDR &sendAdr,
BufId_t *bufId, int *index) {
...
int RCS_t::GetEmptyBufForSend(imc_block_t senderWakeHandle,
MCMEPADDR &sendAdr, BufId_t *bufId, int *index) {
...
main.cxx
...
#include "rcs.h"
...
void Sender() {
imc_block_t sndWakeH;
RCS_t *rcs1 = new(&rcvRcsDesc) RCS_t;
...
status = rcs1->GetEmptyBufForSend(sndWakeH, sndEP, &b1, &index1);
T.R | Title | User | Personal Name | Date | Lines |
---|
883.1 | Added to list | TLE::MERRITT | Steve Merritt, Ladebug Team | Fri Apr 18 1997 15:50 | 3 |
| Thanks for the report. I've added it to the C++ bugs list.
-Steve
|