I am trying out CLion as new IDE and I have this odd problem with debugging. I am trying to step into function cropImage (not method) but all I can get when stepping into is to get to constructor of CRect.
int main ( void )
{
cropImage( "./sample/input_00.raw", "./output_00.raw", CRect(1,2,3,4), ENDIAN_LITTLE);
return 0;
}
Also, when I try to put breakpoint inside function cropImage()
it just get ignored. What am I doing wrong? I think this is pretty much basic function of debugger to step into function, not only methods...
I am using CLion on Linux with GDB and g++.
EDIT: Just to clarify the code and issue here is how the file main.cpp looks
bool cropImage ( const char * srcFileName,
const char * dstFileName,
const CRect & rc,
int byteOrder )
{
// Open streams, create objects, do stuff
}
int main ( void )
{
cropImage( "./sample/input_00.raw", "./output_00.raw", CRect(1,2,3,4), ENDIAN_LITTLE);
return 0;
}
Everything works from CLI ( using gdb on binary created from CLion ), it just that inside of IDE it ignores any breakpoint inside cropImage()
function.
So I find this workaround. Ref: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206606815-Integrated-GDB-and-a-frame-not-available-error
Seems like it's issue on ArchLinux. Even though CLion detects gdb automatically without problems, frames doesn't exist and manually specifying path to gdb ( /usr/bin/gdb
) fixed this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.