Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2020-07-12 12:06:09 -0500

dinesh gravatar image

gdb not working

when i run the ros node with gdb with command rosrun --prefix gdb my_node my_node and than add break point in main function with break main than running the program it shows given error, it was not comming beofer in same program:
__libc_start_main (main=0x58c770 <main>, argc=1, argv=0x7fffffffd368, init=<optimized out="">, fini=<optimized out="">, rtld_fini=<optimized out="">, stack_end=0x7fffffffd358) at ../csu/libc-start.c:344

gdb not working

when i run the ros node with gdb with command rosrun --prefix gdb my_node my_node and than add break point in main function with break main than running the program it shows given error, it was not comming beofer in same program:

  __libc_start_main (main=0x58c770 <main>, argc=1, argv=0x7fffffffd368, init=<optimized out="">, out>, fini=<optimized out="">, out>, rtld_fini=<optimized out="">, out>, stack_end=0x7fffffffd358) at ../csu/libc-start.c:344

../csu/libc-start.c:344

gdb not working

when i run the ros node with gdb with command rosrun --prefix gdb my_node my_node and than add break point in main function with break main than running the program it shows given error, it was not comming beofer in same program:

  __libc_start_main (main=0x58c770 <main>, argc=1, argv=0x7fffffffd368, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd358) at ../csu/libc-start.c:344

main function is as follows:

int main(int argc, char** argv)
{
    ros::init(argc, argv, "image_converter");
    ros::NodeHandle nh;

    if(argc<3) {
        ROS_ERROR("Enter 0 for rgb, 1 for rgbd and 2 for d images and radious of interest point finder!");
        return 0;
    }
    std::cout<<"arg passed = "<<atoi(argv[1])<<std::endl;
    if(atoi(argv[1]) == 0) {
        ImageConverter ic(atoi(argv[2]));
        ros::spin();
    }
    else if (atoi(argv[1]) == 1) {
        ros::Subscriber sub = nh.subscribe ("rgbd", 1, cloud_cb);
        ros::spin ();
    }
    else if (atoi(argv[1]) == 2) {
        ros::Subscriber sub = nh.subscribe ("point_cloud", 1, cloud_cb);
        ros::spin ();
    }
return 0;

}

click to hide/show revision 4
None

gdb not working

when i run the ros node with gdb with command rosrun --prefix gdb my_node my_node and than add break point in main function with break main than running the program it shows given error, it was not comming beofer in same program:

  __libc_start_main (main=0x58c770 <main>, argc=1, argv=0x7fffffffd368, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd358) at ../csu/libc-start.c:344

main function is as follows:

int main(int argc, char** argv)
{
    ros::init(argc, argv, "image_converter");
    ros::NodeHandle nh;

    if(argc<3) {
        ROS_ERROR("Enter 0 for rgb, 1 for rgbd and 2 for d images and radious of interest point finder!");
        return 0;
    }
    std::cout<<"arg passed = "<<atoi(argv[1])<<std::endl;
    if(atoi(argv[1]) == 0) {
        ImageConverter ic(atoi(argv[2]));
        ros::spin();
    }
    else if (atoi(argv[1]) == 1) {
        ros::Subscriber sub = nh.subscribe ("rgbd", 1, cloud_cb);
        ros::spin ();
    }
    else if (atoi(argv[1]) == 2) {
        ros::Subscriber sub = nh.subscribe ("point_cloud", 1, cloud_cb);
        ros::spin ();
    }
 return 0;
}

}