Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Only able to see disassembly when attaching to remote processes

Hi Rainer,

I cannot reproduce neither "Invalid abbreviation table" nor "only disassembly" problem.

I'm using VirtualBox to install and run Debian unstable.

I have found and fixed another issue - Diagnostics would fail with "Undefined identifier 'func2_local2'".
But I don't see anything similar to what you have reported.

Regards,
Eugene

-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Rainer Poisel
Sent: Sunday, January 15, 2017 5:07 AM
To: TCF
Subject: [tcf-dev] Only able to see disassembly when attaching to remote processes

Hello,

the only thing that is shown in Eclipse CDT, when attaching to a
process using TCF agent, is the disassembly window.

Here is what i have been doing:
  * Write a short sample program that is easy to debug

8<==== main.c =======
#include <stdio.h>
#include <unistd.h>

int main(void)
{
    for (int i = 0; i < 10000; i++)
    {
        sleep(1);
        printf("%d\n", i);
    }
    return 0;
}
8<==== main.c =======

  * Compile/link using GCC
    gcc -g -O0 -o main main.c

  * Start the program
    ./main

  * In Eclipse CDT create a new "Generic Connection" of type "TCP" on
127.0.0.1, Port 1534

  * In Eclipse CDT create a new "C/C++ Attach to Application" Configuration
    => Select "TCF Attach to Process Launcher"
    => Click Debug
    => Select the process of ./main

Then the execution of ./main is suspended (no more numbers printed in
the terminal). However, in CDT, only the disassembly view is selected
and one of the lines highlighted in green. The stackframe is not
really useful (Suspended; Signal: Stop executing temporarily) - there
is only one entry shown somewhere in libc.

General debugging works using gdb using the attach and detach commands
for this particular binary/process. So, there should be debug symbols.

My plattform is x86_64 running GNU/Debian Linux unstable. On the agent
side I am on the 1.4_neon tag. On the Eclipse side, TCF components are
of version 1.4.0.201606031137.

Some hints that might help to resolve this issue:
  * Everything (setting breakpoints, the stackframe view, etc.) seems
to work as expected when using the "Target Communication Framework"
Launch Configuration type. However, this does not attach to the
application. Instead, the process is started by Eclpise and/or the TCF
agent. This is not, what I actually wanted.
  * In "System Management", selecting "Diagnostics" => "Run Tests"
from the context menu of my localhost TCF connection results in the
following output:

8<===========
org.eclipse.tcf.core.ErrorReport: TCF error report:
  Command: Diagnostics getSymbol "P24514", "tcf_test_func3"
  Time: 2017-01-15 13:02:03.476
  Error text: Invalid abbreviation table. Error reading DWARF data
  Error code: 21

at org.eclipse.tcf.core.Command.toError(Command.java:256)
at org.eclipse.tcf.core.Command.toError(Command.java:241)
at org.eclipse.tcf.internal.services.remote.DiagnosticsProxy$8.done(DiagnosticsProxy.java:210)
at org.eclipse.tcf.core.Command.result(Command.java:111)
at org.eclipse.tcf.core.AbstractChannel.handleInput(AbstractChannel.java:997)
at org.eclipse.tcf.core.AbstractChannel.access$0(AbstractChannel.java:943)
at org.eclipse.tcf.core.AbstractChannel$1$1.run(AbstractChannel.java:293)
at org.eclipse.tcf.EventQueue.run(EventQueue.java:95)
at java.lang.Thread.run(Thread.java:745)

java.lang.Exception: Invalid BP status: At col 14: Cannot read symbol
data. Invalid abbreviation table. Error reading DWARF data
at org.eclipse.tcf.internal.debug.tests.TestExpressions.breakpointStatusChanged(TestExpressions.java:1049)
at org.eclipse.tcf.internal.services.remote.BreakpointsProxy$11.event(BreakpointsProxy.java:203)
at org.eclipse.tcf.core.AbstractChannel.handleInput(AbstractChannel.java:1060)
at org.eclipse.tcf.core.AbstractChannel.access$0(AbstractChannel.java:943)
at org.eclipse.tcf.core.AbstractChannel$1$1.run(AbstractChannel.java:293)
at org.eclipse.tcf.EventQueue.run(EventQueue.java:95)
at java.lang.Thread.run(Thread.java:745)

java.lang.Exception: Invalid BP status: At col 14: Cannot read symbol
data. Invalid abbreviation table. Error reading DWARF data
at org.eclipse.tcf.internal.debug.tests.TestExpressions.breakpointStatusChanged(TestExpressions.java:1049)
at org.eclipse.tcf.internal.services.remote.BreakpointsProxy$11.event(BreakpointsProxy.java:203)
at org.eclipse.tcf.core.AbstractChannel.handleInput(AbstractChannel.java:1060)
at org.eclipse.tcf.core.AbstractChannel.access$0(AbstractChannel.java:943)
at org.eclipse.tcf.core.AbstractChannel$1$1.run(AbstractChannel.java:293)
at org.eclipse.tcf.EventQueue.run(EventQueue.java:95)
at java.lang.Thread.run(Thread.java:745)

org.eclipse.tcf.core.ErrorReport: TCF error report:
  Command: Diagnostics getSymbol "P24517", "tcf_test_func3"
  Time: 2017-01-15 13:02:03.476
  Error text: Invalid abbreviation table. Error reading DWARF data
  Error code: 21

at org.eclipse.tcf.core.Command.toError(Command.java:256)
at org.eclipse.tcf.core.Command.toError(Command.java:241)
at org.eclipse.tcf.internal.services.remote.DiagnosticsProxy$8.done(DiagnosticsProxy.java:210)
at org.eclipse.tcf.core.Command.result(Command.java:111)
at org.eclipse.tcf.core.AbstractChannel.handleInput(AbstractChannel.java:997)
at org.eclipse.tcf.core.AbstractChannel.access$0(AbstractChannel.java:943)
at org.eclipse.tcf.core.AbstractChannel$1$1.run(AbstractChannel.java:293)
at org.eclipse.tcf.EventQueue.run(EventQueue.java:95)
at java.lang.Thread.run(Thread.java:745)
8<===========

Any ideas?

Thank you for your help,
  Rainer
_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tcf-dev


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.



Back to the top