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

< CDT‎ | Obsolete
Revision as of 16:37, 6 July 2010 by Marc.khouzam.gmail.com (Talk | contribs) (Showing cores in Debug view labels)

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"}]

Suggestions

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. We can do the same for processes. The below image shows this.

CoreLabels.png

This feature has been implemented for CDT 8.0 as part of Bug 318230

Debug view grouping threads by cores

(Suggestion from Mikhail from https://bugs.eclipse.org/bugs/show_bug.cgi?id=318230#c4)

I think it would be useful to have an option in the debug view that allows users to group threads by cores. Your screenshot would look like this:

- core2
   - thread3
- core3
   - thread1
   - thread2

Users would be able to switch from the "traditional" view to the "core" view and back. I have seen it in some commercial products and think it is doable. Don't know if any kind of core related GDB commands is available now but I am sure it will follow.

Back to the top