[Bug remote/25111] New: [Zephyr/thread aware debugging] remote: write_ptid returns negative tid.

doubledn94 at gmail dot com sourceware-bugzilla@sourceware.org
Thu Oct 17 07:24:00 GMT 2019


            Bug ID: 25111
           Summary: [Zephyr/thread aware debugging] remote: write_ptid
                    returns negative tid.
           Product: gdb
           Version: 8.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: remote
          Assignee: unassigned at sourceware dot org
          Reporter: doubledn94 at gmail dot com
  Target Milestone: ---

In Zephyr the k_thread_create function returns thread ID which is actually
pointer to k_thread structure. See:

In ARC case the address space starts from 0x80000000, and passing such big
values(>2147483648) to write_ptid function leads to overflow of "int tid"
variable. Actually process/thread id's are positive and rarely exceeds the
maximum of Int. 

Do we really need this negative tid/pid handling? Maybe moving to uint32_t type
would be better there?

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Gdb-prs mailing list