Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

CDT/Obsolete/designs/MultiCoreDebug

Introduction

This page describes the effort to bring multi-core debugging to the CDT. Multi-core debugging should provide the user with knowledge and control about the different cores of the target machine of a debugging session.

GDB

As of version 7.1, some information is reported by GDB with respect to the cores threads and processes are located on. See details on the GDB mailing list here. Specifically, changes of interest are:

  • The MI stopped event shows core:
    • *stopped,frame={addr="0x08048618",func="main",args=[],file="a.cc",fullname="/local/a.cc",line="9"},thread-id="1",stopped-threads="all",core="1"
  • -list-thread-groups shows cores:
    • -list-thread-groups => ^done,groups=[{id="13286",type="process",pid="13286",cores=["1"]}]
    • -list-thread-groups 13286 -> ^done,threads=[{id="1",target-id="process 13286",frame={level="0",addr="0x08048618",func="main",args=[],file="a.cc",fullname="/local/a.cc",line="9"},state="stopped",core="1"}]
  • -list-thread-groups --available shows cores but only when connected to gdbserver
    • ^done,groups=[{id="13492",type="process",description="sleep 5",user="lmckhou",cores=["0"]},{id="25226",type="process",description="/local/lmckhou/jre1.6.0_20/bin/java",user="lmckhou",cores=["0","1","2","3"]} ....
  • -thread-info shows core:
    • ^done,threads=[{id="1",target-id="Thread 13433",frame={level="0",addr="0xb7f3a840",func="_start",args=[],from="/lib/ld-linux.so.2"},state="stopped",core="0"}]

DSF-GDB enhancements

Showing cores in Debug view labels

By using the enhancements of GDB 7.1, we can show the core on which each thread runs as an extra part of the Debug View label. The below image shows this suggestion.

CoreLabels.png

We could also show the list of cores on which a process runs (each core it has a thread on), as part of the process label.

Back to the top