Commit f7e68e1
gdb/remote: make tid/pid type long in write_ptid
In Zephyr RTOS the k_thread_create function returns
thread ID which is actually pointer to k_thread structure.
If the memory addressing starts from 0x80000000, passing such
big values to write_ptid() leads to overflow of "int tid" variable
and thread ID becomes negative.
So lets make tid/pid variables type "long", this will prevent overflow
and should not break any logic.
Signed-off-by: Evgeniy Didin <didin@synopsys.com>
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>1 parent 4102c45 commit f7e68e1
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3443 | 3443 | | |
3444 | 3444 | | |
3445 | 3445 | | |
3446 | | - | |
| 3446 | + | |
3447 | 3447 | | |
3448 | 3448 | | |
3449 | 3449 | | |
3450 | 3450 | | |
3451 | 3451 | | |
3452 | | - | |
| 3452 | + | |
3453 | 3453 | | |
3454 | | - | |
| 3454 | + | |
3455 | 3455 | | |
3456 | 3456 | | |
3457 | 3457 | | |
3458 | | - | |
| 3458 | + | |
3459 | 3459 | | |
3460 | | - | |
| 3460 | + | |
3461 | 3461 | | |
3462 | 3462 | | |
3463 | 3463 | | |
| |||
0 commit comments