|
|
|
|
|
|
Re: Using GDB debugger for debugging CC files [message #1831870 is a reply to message #1831766] |
Tue, 01 September 2020 12:37 |
Mujeeb Ur Rehman Messages: 16 Registered: January 2020 |
Junior Member |
|
|
Gábor Szalai wrote on Fri, 28 August 2020 12:02The HC spawns a separate process for MTC and any other PTC. So any test code is running on MTC or PTC process not inside the HC process.
You should attach the gdb to the right process not the HC process.
But I recommend to add some log statement to the test port code.
I need some guidance on this
Well i tried to attach the process and this worked but i am facing an issue when i attach the process i am not able to give gdb related commands in the terminal as test executions starts, the same happens on the client side where the executable is run,
Server Side:
Quote:
[mreh@abc bin]$ gdb ./mctr_cli cfg.cfg
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-92.el6)
Copyright (C) 2010 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 "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/mreh/Desktop/TTCN/ttcn3-6.5.pl0-linux64-gcc4.4.5-rhel6/bin/mctr_cli...(no debugging symbols found)...done.
"/home/mreh/Desktop/TTCN/ttcn3-6.5.pl0-linux64-gcc4.4.5-rhel6/bin/cfg.cfg" is not a core dump: File format not recognized
(gdb) run cfg.cfg
Starting program: /home/mreh/Desktop/TTCN/ttcn3-6.5.pl0-linux64-gcc4.4.5-rhel6/bin/mctr_cli cfg.cfg
[Thread debugging using libthread_db enabled]
*************************************************************************
* TTCN-3 Test Executor - Main Controller 2 *
* Version: CRL 113 200/6 R5A *
* Copyright (c) 2000-2018 Ericsson Telecom AB *
* All rights reserved. This program and the accompanying materials *
* are made available under the terms of the Eclipse Public License v2.0 *
* which accompanies this distribution, and is available at *
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html *
*************************************************************************
Using configuration file: cfg.cfg
MC@abc Unix server socket created successfully.
[New Thread 0x7ffff7fdc700 (LWP 2902)]
MC@abc: Listening on TCP port 9034.
MC2> MC@abc: New HC connected from 127.0.0.1 [127.0.0.1]. abc: Linux 2.6.32-754.14.2.el6.x86_64 on x86_64.
cmtc
MC@abc: Downloading configuration file to all HCs.
MC@abc: Configuration file was processed on all HCs.
MC@abc: Creating MTC on host 127.0.0.1.
MC@abc: MTC is created.
MC2> smtc
Executing all items of [EXECUTE] section.
MC2> MTC@abc: Test case TC_22_2_1 started.
3@abc: Warning: Unknown XER encoding requested; using Basic XER.
Program received signal SIGINT, Interrupt.
0x0000003cf560e82d in read () from /lib64/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.212.el6_10.3.x86_64 libgcc-4.4.7-23.el6.x86_64 libstdc++-4.4.7-23.el6.x86_64 ncurses-libs-5.7-4.20090207.el6.x86_64 openssl-1.0.1e-58.el6_10.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) quit
A debugging session is active.
Inferior 1 [process 2899] will be killed.
Client Side:
Quote:[mreh@abc NBIOT]$ gdb ./TTCN3_testcases.exe
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-92.el6)
Copyright (C) 2010 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 "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/mreh/Desktop/TTCN/ttcn3-6.5.pl0-linux64-gcc4.4.5-rhel6/NBIOT/TTCN3_testcases.exe...(no debugging symbols found)...done.
(gdb) run -s IPADDRESSES 9034
Starting program: /home/mreh/Desktop/TTCN/ttcn3-6.5.pl0-linux64-gcc4.4.5-rhel6/NBIOT/TTCN3_testcases.exe -sIPADDRESSES 9034
[Thread debugging using libthread_db enabled]
TTCN-3 Host Controller (parallel mode), version CRL 113 200/6 R5A
Detaching after fork from child process 3298.
Detaching after fork from child process 3307.
So kindly is there some solution to this? how i give gdb commands during test execution? and can bring back the gdb terminal?
Thanks again every one for your kind advices and help :)
Best Regards,
Mujeeb
[Updated on: Thu, 03 September 2020 14:36] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04926 seconds