summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/shared
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-03-03 23:08:49 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-03-03 23:08:49 +0000
commitbf511e834a55793d93cadb864aa689ed4426b1f2 (patch)
treebddbfc95f152c1e7008e06daee17d548fa9c51c2 /c/src/lib/libbsp/shared
parent2008-03-03 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-bf511e834a55793d93cadb864aa689ed4426b1f2.tar.bz2
2008-03-03 Joel Sherrill <joel.sherrill@OARcorp.com>
* gdbstub/rtems-stub-glue.c: Update to use the new rtems_object_get_name() service. This simplified the code a bit.
Diffstat (limited to 'c/src/lib/libbsp/shared')
-rw-r--r--c/src/lib/libbsp/shared/ChangeLog5
-rw-r--r--c/src/lib/libbsp/shared/gdbstub/rtems-stub-glue.c27
2 files changed, 8 insertions, 24 deletions
diff --git a/c/src/lib/libbsp/shared/ChangeLog b/c/src/lib/libbsp/shared/ChangeLog
index 7315cf28a4..e766aadaa3 100644
--- a/c/src/lib/libbsp/shared/ChangeLog
+++ b/c/src/lib/libbsp/shared/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-03 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * gdbstub/rtems-stub-glue.c: Update to use the new
+ rtems_object_get_name() service. This simplified the code a bit.
+
2008-01-22 Joel Sherrill <joel.sherrill@OARcorp.com>
* bootcard.c: Improve comments and clean up argc/argv order.
diff --git a/c/src/lib/libbsp/shared/gdbstub/rtems-stub-glue.c b/c/src/lib/libbsp/shared/gdbstub/rtems-stub-glue.c
index 828fa17806..5869ed9a0a 100644
--- a/c/src/lib/libbsp/shared/gdbstub/rtems-stub-glue.c
+++ b/c/src/lib/libbsp/shared/gdbstub/rtems-stub-glue.c
@@ -335,18 +335,7 @@ int rtems_gdb_stub_get_thread_info(
tmp_buf[8] = 0;
strcat(info->display, tmp_buf);
-#if 0
- name = *(uint32_t*)(obj_info->local_table[thread]->name);
-#else
- name = *(uint32_t*)(obj_info->local_table[thread -
- first_rtems_id + 1]->name);
-#endif
- info->name[0] = (name >> 24) & 0xff;
- info->name[1] = (name >> 16) & 0xff;
- info->name[2] = (name >> 8) & 0xff;
- info->name[3] = name & 0xff;
- info->name[4] = 0;
-
+ rtems_object_get_name( thread, 5, info->name );
info->more_display[0] = 0; /* Nothing */
return 1;
@@ -360,8 +349,7 @@ int rtems_gdb_stub_get_thread_info(
max_id = obj_info->maximum_id;
th = (Thread_Control *)(obj_info->local_table[thread - first_posix_id + 1]);
- if (th == NULL)
- {
+ if (th == NULL) {
/* Thread does not exist */
return 0;
}
@@ -379,16 +367,7 @@ int rtems_gdb_stub_get_thread_info(
tmp_buf[8] = 0;
strcat(info->display, tmp_buf);
-
- name = *(uint32_t*)(obj_info->local_table[thread -
- first_posix_id + 1]->name);
-
- info->name[0] = (name >> 24) & 0xff;
- info->name[1] = (name >> 16) & 0xff;
- info->name[2] = (name >> 8) & 0xff;
- info->name[3] = name & 0xff;
- info->name[4] = 0;
-
+ rtems_object_get_name( thread, 5, info->name );
info->more_display[0] = 0; /* Nothing */
return 1;