cpukit/libdebugger: Use uintptr_t for pointers

Use uintptr_t instead of DB_UINT when the variable in question describes
a pointer.
This commit is contained in:
Kinsey Moore
2021-10-15 19:18:02 -05:00
committed by Joel Sherrill
parent a678d1a99c
commit 102261043a
5 changed files with 20 additions and 20 deletions

View File

@@ -376,7 +376,7 @@ rtems_debugger_target_write_regs(rtems_debugger_thread* thread)
return 0; return 0;
} }
DB_UINT uintptr_t
rtems_debugger_target_reg_pc(rtems_debugger_thread* thread) rtems_debugger_target_reg_pc(rtems_debugger_thread* thread)
{ {
int r; int r;
@@ -387,13 +387,13 @@ rtems_debugger_target_reg_pc(rtems_debugger_thread* thread)
return 0; return 0;
} }
DB_UINT uintptr_t
rtems_debugger_target_frame_pc(CPU_Exception_frame* frame) rtems_debugger_target_frame_pc(CPU_Exception_frame* frame)
{ {
return (DB_UINT) frame->eip; return (uintptr_t) frame->eip;
} }
DB_UINT uintptr_t
rtems_debugger_target_reg_sp(rtems_debugger_thread* thread) rtems_debugger_target_reg_sp(rtems_debugger_thread* thread)
{ {
int r; int r;
@@ -404,7 +404,7 @@ rtems_debugger_target_reg_sp(rtems_debugger_thread* thread)
return 0; return 0;
} }
DB_UINT uintptr_t
rtems_debugger_target_tcb_sp(rtems_debugger_thread* thread) rtems_debugger_target_tcb_sp(rtems_debugger_thread* thread)
{ {
return (DB_UINT) thread->tcb->Registers.esp; return (DB_UINT) thread->tcb->Registers.esp;
@@ -503,7 +503,7 @@ rtems_debugger_target_hwbreak_remove(void)
int int
rtems_debugger_target_hwbreak_control(rtems_debugger_target_watchpoint wp, rtems_debugger_target_hwbreak_control(rtems_debugger_target_watchpoint wp,
bool insert, bool insert,
DB_UINT addr, uintptr_t addr,
DB_UINT kind) DB_UINT kind)
{ {
/* /*

View File

@@ -315,7 +315,7 @@ rtems_debugger_target_exception(CPU_Exception_frame* frame)
Thread_Control* thread = _Thread_Get_executing(); Thread_Control* thread = _Thread_Get_executing();
const rtems_id tid = thread->Object.id; const rtems_id tid = thread->Object.id;
rtems_id* excludes; rtems_id* excludes;
DB_UINT pc; uintptr_t pc;
const rtems_debugger_thread_stepper* stepper; const rtems_debugger_thread_stepper* stepper;
rtems_debugger_exception target_exception; rtems_debugger_exception target_exception;
size_t i; size_t i;

View File

@@ -164,22 +164,22 @@ extern int rtems_debugger_target_write_regs(rtems_debugger_thread* thread);
/** /**
* Return the thread's program counter (PC). * Return the thread's program counter (PC).
*/ */
extern DB_UINT rtems_debugger_target_reg_pc(rtems_debugger_thread* thread); extern uintptr_t rtems_debugger_target_reg_pc(rtems_debugger_thread* thread);
/** /**
* Return the frame's program counter (PC). * Return the frame's program counter (PC).
*/ */
extern DB_UINT rtems_debugger_target_frame_pc(CPU_Exception_frame* frame); extern uintptr_t rtems_debugger_target_frame_pc(CPU_Exception_frame* frame);
/** /**
* Return the thread's stack pointer (SP). * Return the thread's stack pointer (SP).
*/ */
extern DB_UINT rtems_debugger_target_reg_sp(rtems_debugger_thread* thread); extern uintptr_t rtems_debugger_target_reg_sp(rtems_debugger_thread* thread);
/** /**
* Return the thread's TCB stack pointer (SP). * Return the thread's TCB stack pointer (SP).
*/ */
extern DB_UINT rtems_debugger_target_tcb_sp(rtems_debugger_thread* thread); extern uintptr_t rtems_debugger_target_tcb_sp(rtems_debugger_thread* thread);
/** /**
* The thread is stepping. Setup the thread to step an instruction. * The thread is stepping. Setup the thread to step an instruction.
@@ -228,7 +228,7 @@ extern int rtems_debugger_target_hwbreak_remove(void);
*/ */
extern int rtems_debugger_target_hwbreak_control(rtems_debugger_target_watchpoint type, extern int rtems_debugger_target_hwbreak_control(rtems_debugger_target_watchpoint type,
bool insert, bool insert,
DB_UINT addr, uintptr_t addr,
DB_UINT kind); DB_UINT kind);
/** /**

View File

@@ -469,8 +469,8 @@ rtems_debugger_thread_step(rtems_debugger_thread* thread)
int int
rtems_debugger_thread_stepping(rtems_debugger_thread* thread, rtems_debugger_thread_stepping(rtems_debugger_thread* thread,
DB_UINT start, uintptr_t start,
DB_UINT end) uintptr_t end)
{ {
/* add lock */ /* add lock */
rtems_debugger_threads* threads = rtems_debugger->threads; rtems_debugger_threads* threads = rtems_debugger->threads;
@@ -496,7 +496,7 @@ rtems_debugger_thread_stepping(rtems_debugger_thread* thread,
} }
const rtems_debugger_thread_stepper* const rtems_debugger_thread_stepper*
rtems_debugger_thread_is_stepping(rtems_id id, DB_UINT pc) rtems_debugger_thread_is_stepping(rtems_id id, uintptr_t pc)
{ {
/* add lock */ /* add lock */
rtems_debugger_threads* threads = rtems_debugger->threads; rtems_debugger_threads* threads = rtems_debugger->threads;

View File

@@ -102,8 +102,8 @@ typedef struct rtems_debugger_thread
typedef struct rtems_debugger_thread_stepper typedef struct rtems_debugger_thread_stepper
{ {
rtems_debugger_thread* thread; rtems_debugger_thread* thread;
DB_UINT start; uintptr_t start;
DB_UINT end; uintptr_t end;
} rtems_debugger_thread_stepper; } rtems_debugger_thread_stepper;
/** /**
@@ -165,15 +165,15 @@ extern int rtems_debugger_thread_step(rtems_debugger_thread* thread);
* Thread is stepping so record the details. * Thread is stepping so record the details.
*/ */
extern int rtems_debugger_thread_stepping(rtems_debugger_thread* thread, extern int rtems_debugger_thread_stepping(rtems_debugger_thread* thread,
DB_UINT start, uintptr_t start,
DB_UINT end); uintptr_t end);
/** /**
* Thread's PC in the stepping range? Returns the stepper is in range else * Thread's PC in the stepping range? Returns the stepper is in range else
* NULL. * NULL.
*/ */
extern const rtems_debugger_thread_stepper* extern const rtems_debugger_thread_stepper*
rtems_debugger_thread_is_stepping(rtems_id id, DB_UINT pc); rtems_debugger_thread_is_stepping(rtems_id id, uintptr_t pc);
/** /**
* Return the thread's current priority/ * Return the thread's current priority/