diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2011-10-31 20:12:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 20:30:56 -0400 |
commit | 50e1499f468fd74c6db95deb2e1e6bfee578ae70 (patch) | |
tree | 0b34eb53c9b164cd2f3562cdef1207b814ac26d8 | |
parent | 55036ba76b2d2fd53b5c00993fcec5ed56e83922 (diff) |
kgdb: follow rename pack_hex_byte() to hex_byte_pack()
There is no functional change.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/cris/arch-v10/kernel/kgdb.c | 6 | ||||
-rw-r--r-- | arch/cris/arch-v32/kernel/kgdb.c | 14 | ||||
-rw-r--r-- | arch/frv/kernel/gdb-stub.c | 44 | ||||
-rw-r--r-- | arch/mn10300/kernel/gdb-stub.c | 52 | ||||
-rw-r--r-- | kernel/debug/gdbstub.c | 12 |
5 files changed, 64 insertions, 64 deletions
diff --git a/arch/cris/arch-v10/kernel/kgdb.c b/arch/cris/arch-v10/kernel/kgdb.c index b9f9c8ce2169..b579dd02e098 100644 --- a/arch/cris/arch-v10/kernel/kgdb.c +++ b/arch/cris/arch-v10/kernel/kgdb.c | |||
@@ -694,7 +694,7 @@ mem2hex(char *buf, unsigned char *mem, int count) | |||
694 | /* Valid mem address. */ | 694 | /* Valid mem address. */ |
695 | for (i = 0; i < count; i++) { | 695 | for (i = 0; i < count; i++) { |
696 | ch = *mem++; | 696 | ch = *mem++; |
697 | buf = pack_hex_byte(buf, ch); | 697 | buf = hex_byte_pack(buf, ch); |
698 | } | 698 | } |
699 | } | 699 | } |
700 | 700 | ||
@@ -868,7 +868,7 @@ stub_is_stopped(int sigval) | |||
868 | /* Send trap type (converted to signal) */ | 868 | /* Send trap type (converted to signal) */ |
869 | 869 | ||
870 | *ptr++ = 'T'; | 870 | *ptr++ = 'T'; |
871 | ptr = pack_hex_byte(ptr, sigval); | 871 | ptr = hex_byte_pack(ptr, sigval); |
872 | 872 | ||
873 | /* Send register contents. We probably only need to send the | 873 | /* Send register contents. We probably only need to send the |
874 | * PC, frame pointer and stack pointer here. Other registers will be | 874 | * PC, frame pointer and stack pointer here. Other registers will be |
@@ -881,7 +881,7 @@ stub_is_stopped(int sigval) | |||
881 | status = read_register (regno, ®_cont); | 881 | status = read_register (regno, ®_cont); |
882 | 882 | ||
883 | if (status == SUCCESS) { | 883 | if (status == SUCCESS) { |
884 | ptr = pack_hex_byte(ptr, regno); | 884 | ptr = hex_byte_pack(ptr, regno); |
885 | *ptr++ = ':'; | 885 | *ptr++ = ':'; |
886 | 886 | ||
887 | ptr = mem2hex(ptr, (unsigned char *)®_cont, | 887 | ptr = mem2hex(ptr, (unsigned char *)®_cont, |
diff --git a/arch/cris/arch-v32/kernel/kgdb.c b/arch/cris/arch-v32/kernel/kgdb.c index c0343c3ea7f8..8c1d35cdf00a 100644 --- a/arch/cris/arch-v32/kernel/kgdb.c +++ b/arch/cris/arch-v32/kernel/kgdb.c | |||
@@ -677,7 +677,7 @@ mem2hex(char *buf, unsigned char *mem, int count) | |||
677 | /* Valid mem address. */ | 677 | /* Valid mem address. */ |
678 | for (i = 0; i < count; i++) { | 678 | for (i = 0; i < count; i++) { |
679 | ch = *mem++; | 679 | ch = *mem++; |
680 | buf = pack_hex_byte(buf, ch); | 680 | buf = hex_byte_pack(buf, ch); |
681 | } | 681 | } |
682 | } | 682 | } |
683 | /* Terminate properly. */ | 683 | /* Terminate properly. */ |
@@ -695,7 +695,7 @@ mem2hex_nbo(char *buf, unsigned char *mem, int count) | |||
695 | mem += count - 1; | 695 | mem += count - 1; |
696 | for (i = 0; i < count; i++) { | 696 | for (i = 0; i < count; i++) { |
697 | ch = *mem--; | 697 | ch = *mem--; |
698 | buf = pack_hex_byte(buf, ch); | 698 | buf = hex_byte_pack(buf, ch); |
699 | } | 699 | } |
700 | 700 | ||
701 | /* Terminate properly. */ | 701 | /* Terminate properly. */ |
@@ -880,7 +880,7 @@ stub_is_stopped(int sigval) | |||
880 | /* Send trap type (converted to signal) */ | 880 | /* Send trap type (converted to signal) */ |
881 | 881 | ||
882 | *ptr++ = 'T'; | 882 | *ptr++ = 'T'; |
883 | ptr = pack_hex_byte(ptr, sigval); | 883 | ptr = hex_byte_pack(ptr, sigval); |
884 | 884 | ||
885 | if (((reg.exs & 0xff00) >> 8) == 0xc) { | 885 | if (((reg.exs & 0xff00) >> 8) == 0xc) { |
886 | 886 | ||
@@ -988,26 +988,26 @@ stub_is_stopped(int sigval) | |||
988 | } | 988 | } |
989 | /* Only send PC, frame and stack pointer. */ | 989 | /* Only send PC, frame and stack pointer. */ |
990 | read_register(PC, ®_cont); | 990 | read_register(PC, ®_cont); |
991 | ptr = pack_hex_byte(ptr, PC); | 991 | ptr = hex_byte_pack(ptr, PC); |
992 | *ptr++ = ':'; | 992 | *ptr++ = ':'; |
993 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[PC]); | 993 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[PC]); |
994 | *ptr++ = ';'; | 994 | *ptr++ = ';'; |
995 | 995 | ||
996 | read_register(R8, ®_cont); | 996 | read_register(R8, ®_cont); |
997 | ptr = pack_hex_byte(ptr, R8); | 997 | ptr = hex_byte_pack(ptr, R8); |
998 | *ptr++ = ':'; | 998 | *ptr++ = ':'; |
999 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[R8]); | 999 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[R8]); |
1000 | *ptr++ = ';'; | 1000 | *ptr++ = ';'; |
1001 | 1001 | ||
1002 | read_register(SP, ®_cont); | 1002 | read_register(SP, ®_cont); |
1003 | ptr = pack_hex_byte(ptr, SP); | 1003 | ptr = hex_byte_pack(ptr, SP); |
1004 | *ptr++ = ':'; | 1004 | *ptr++ = ':'; |
1005 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[SP]); | 1005 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[SP]); |
1006 | *ptr++ = ';'; | 1006 | *ptr++ = ';'; |
1007 | 1007 | ||
1008 | /* Send ERP as well; this will save us an entire register fetch in some cases. */ | 1008 | /* Send ERP as well; this will save us an entire register fetch in some cases. */ |
1009 | read_register(ERP, ®_cont); | 1009 | read_register(ERP, ®_cont); |
1010 | ptr = pack_hex_byte(ptr, ERP); | 1010 | ptr = hex_byte_pack(ptr, ERP); |
1011 | *ptr++ = ':'; | 1011 | *ptr++ = ':'; |
1012 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[ERP]); | 1012 | ptr = mem2hex(ptr, (unsigned char *)®_cont, register_size[ERP]); |
1013 | *ptr++ = ';'; | 1013 | *ptr++ = ';'; |
diff --git a/arch/frv/kernel/gdb-stub.c b/arch/frv/kernel/gdb-stub.c index a4dba6b20bd0..a6d5381c94fe 100644 --- a/arch/frv/kernel/gdb-stub.c +++ b/arch/frv/kernel/gdb-stub.c | |||
@@ -672,7 +672,7 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa | |||
672 | if ((uint32_t)mem&1 && count>=1) { | 672 | if ((uint32_t)mem&1 && count>=1) { |
673 | if (!gdbstub_read_byte(mem,ch)) | 673 | if (!gdbstub_read_byte(mem,ch)) |
674 | return NULL; | 674 | return NULL; |
675 | buf = pack_hex_byte(buf, ch[0]); | 675 | buf = hex_byte_pack(buf, ch[0]); |
676 | mem++; | 676 | mem++; |
677 | count--; | 677 | count--; |
678 | } | 678 | } |
@@ -680,8 +680,8 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa | |||
680 | if ((uint32_t)mem&3 && count>=2) { | 680 | if ((uint32_t)mem&3 && count>=2) { |
681 | if (!gdbstub_read_word(mem,(uint16_t *)ch)) | 681 | if (!gdbstub_read_word(mem,(uint16_t *)ch)) |
682 | return NULL; | 682 | return NULL; |
683 | buf = pack_hex_byte(buf, ch[0]); | 683 | buf = hex_byte_pack(buf, ch[0]); |
684 | buf = pack_hex_byte(buf, ch[1]); | 684 | buf = hex_byte_pack(buf, ch[1]); |
685 | mem += 2; | 685 | mem += 2; |
686 | count -= 2; | 686 | count -= 2; |
687 | } | 687 | } |
@@ -689,10 +689,10 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa | |||
689 | while (count>=4) { | 689 | while (count>=4) { |
690 | if (!gdbstub_read_dword(mem,(uint32_t *)ch)) | 690 | if (!gdbstub_read_dword(mem,(uint32_t *)ch)) |
691 | return NULL; | 691 | return NULL; |
692 | buf = pack_hex_byte(buf, ch[0]); | 692 | buf = hex_byte_pack(buf, ch[0]); |
693 | buf = pack_hex_byte(buf, ch[1]); | 693 | buf = hex_byte_pack(buf, ch[1]); |
694 | buf = pack_hex_byte(buf, ch[2]); | 694 | buf = hex_byte_pack(buf, ch[2]); |
695 | buf = pack_hex_byte(buf, ch[3]); | 695 | buf = hex_byte_pack(buf, ch[3]); |
696 | mem += 4; | 696 | mem += 4; |
697 | count -= 4; | 697 | count -= 4; |
698 | } | 698 | } |
@@ -700,8 +700,8 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa | |||
700 | if (count>=2) { | 700 | if (count>=2) { |
701 | if (!gdbstub_read_word(mem,(uint16_t *)ch)) | 701 | if (!gdbstub_read_word(mem,(uint16_t *)ch)) |
702 | return NULL; | 702 | return NULL; |
703 | buf = pack_hex_byte(buf, ch[0]); | 703 | buf = hex_byte_pack(buf, ch[0]); |
704 | buf = pack_hex_byte(buf, ch[1]); | 704 | buf = hex_byte_pack(buf, ch[1]); |
705 | mem += 2; | 705 | mem += 2; |
706 | count -= 2; | 706 | count -= 2; |
707 | } | 707 | } |
@@ -709,7 +709,7 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa | |||
709 | if (count>=1) { | 709 | if (count>=1) { |
710 | if (!gdbstub_read_byte(mem,ch)) | 710 | if (!gdbstub_read_byte(mem,ch)) |
711 | return NULL; | 711 | return NULL; |
712 | buf = pack_hex_byte(buf, ch[0]); | 712 | buf = hex_byte_pack(buf, ch[0]); |
713 | } | 713 | } |
714 | 714 | ||
715 | *buf = 0; | 715 | *buf = 0; |
@@ -1498,21 +1498,21 @@ void gdbstub(int sigval) | |||
1498 | ptr = mem2hex(title, ptr, sizeof(title) - 1,0); | 1498 | ptr = mem2hex(title, ptr, sizeof(title) - 1,0); |
1499 | 1499 | ||
1500 | hx = hex_asc_hi(brr >> 24); | 1500 | hx = hex_asc_hi(brr >> 24); |
1501 | ptr = pack_hex_byte(ptr, hx); | 1501 | ptr = hex_byte_pack(ptr, hx); |
1502 | hx = hex_asc_lo(brr >> 24); | 1502 | hx = hex_asc_lo(brr >> 24); |
1503 | ptr = pack_hex_byte(ptr, hx); | 1503 | ptr = hex_byte_pack(ptr, hx); |
1504 | hx = hex_asc_hi(brr >> 16); | 1504 | hx = hex_asc_hi(brr >> 16); |
1505 | ptr = pack_hex_byte(ptr, hx); | 1505 | ptr = hex_byte_pack(ptr, hx); |
1506 | hx = hex_asc_lo(brr >> 16); | 1506 | hx = hex_asc_lo(brr >> 16); |
1507 | ptr = pack_hex_byte(ptr, hx); | 1507 | ptr = hex_byte_pack(ptr, hx); |
1508 | hx = hex_asc_hi(brr >> 8); | 1508 | hx = hex_asc_hi(brr >> 8); |
1509 | ptr = pack_hex_byte(ptr, hx); | 1509 | ptr = hex_byte_pack(ptr, hx); |
1510 | hx = hex_asc_lo(brr >> 8); | 1510 | hx = hex_asc_lo(brr >> 8); |
1511 | ptr = pack_hex_byte(ptr, hx); | 1511 | ptr = hex_byte_pack(ptr, hx); |
1512 | hx = hex_asc_hi(brr); | 1512 | hx = hex_asc_hi(brr); |
1513 | ptr = pack_hex_byte(ptr, hx); | 1513 | ptr = hex_byte_pack(ptr, hx); |
1514 | hx = hex_asc_lo(brr); | 1514 | hx = hex_asc_lo(brr); |
1515 | ptr = pack_hex_byte(ptr, hx); | 1515 | ptr = hex_byte_pack(ptr, hx); |
1516 | 1516 | ||
1517 | ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0); | 1517 | ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0); |
1518 | *ptr = 0; | 1518 | *ptr = 0; |
@@ -1526,10 +1526,10 @@ void gdbstub(int sigval) | |||
1526 | 1526 | ||
1527 | /* Send trap type (converted to signal) */ | 1527 | /* Send trap type (converted to signal) */ |
1528 | *ptr++ = 'T'; | 1528 | *ptr++ = 'T'; |
1529 | ptr = pack_hex_byte(ptr, sigval); | 1529 | ptr = hex_byte_pack(ptr, sigval); |
1530 | 1530 | ||
1531 | /* Send Error PC */ | 1531 | /* Send Error PC */ |
1532 | ptr = pack_hex_byte(ptr, GDB_REG_PC); | 1532 | ptr = hex_byte_pack(ptr, GDB_REG_PC); |
1533 | *ptr++ = ':'; | 1533 | *ptr++ = ':'; |
1534 | ptr = mem2hex(&__debug_frame->pc, ptr, 4, 0); | 1534 | ptr = mem2hex(&__debug_frame->pc, ptr, 4, 0); |
1535 | *ptr++ = ';'; | 1535 | *ptr++ = ';'; |
@@ -1537,7 +1537,7 @@ void gdbstub(int sigval) | |||
1537 | /* | 1537 | /* |
1538 | * Send frame pointer | 1538 | * Send frame pointer |
1539 | */ | 1539 | */ |
1540 | ptr = pack_hex_byte(ptr, GDB_REG_FP); | 1540 | ptr = hex_byte_pack(ptr, GDB_REG_FP); |
1541 | *ptr++ = ':'; | 1541 | *ptr++ = ':'; |
1542 | ptr = mem2hex(&__debug_frame->fp, ptr, 4, 0); | 1542 | ptr = mem2hex(&__debug_frame->fp, ptr, 4, 0); |
1543 | *ptr++ = ';'; | 1543 | *ptr++ = ';'; |
@@ -1545,7 +1545,7 @@ void gdbstub(int sigval) | |||
1545 | /* | 1545 | /* |
1546 | * Send stack pointer | 1546 | * Send stack pointer |
1547 | */ | 1547 | */ |
1548 | ptr = pack_hex_byte(ptr, GDB_REG_SP); | 1548 | ptr = hex_byte_pack(ptr, GDB_REG_SP); |
1549 | *ptr++ = ':'; | 1549 | *ptr++ = ':'; |
1550 | ptr = mem2hex(&__debug_frame->sp, ptr, 4, 0); | 1550 | ptr = mem2hex(&__debug_frame->sp, ptr, 4, 0); |
1551 | *ptr++ = ';'; | 1551 | *ptr++ = ';'; |
diff --git a/arch/mn10300/kernel/gdb-stub.c b/arch/mn10300/kernel/gdb-stub.c index 538266b2c9bc..522eb8a9b60d 100644 --- a/arch/mn10300/kernel/gdb-stub.c +++ b/arch/mn10300/kernel/gdb-stub.c | |||
@@ -798,7 +798,7 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault) | |||
798 | if ((u32) mem & 1 && count >= 1) { | 798 | if ((u32) mem & 1 && count >= 1) { |
799 | if (gdbstub_read_byte(mem, ch) != 0) | 799 | if (gdbstub_read_byte(mem, ch) != 0) |
800 | return 0; | 800 | return 0; |
801 | buf = pack_hex_byte(buf, ch[0]); | 801 | buf = hex_byte_pack(buf, ch[0]); |
802 | mem++; | 802 | mem++; |
803 | count--; | 803 | count--; |
804 | } | 804 | } |
@@ -806,8 +806,8 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault) | |||
806 | if ((u32) mem & 3 && count >= 2) { | 806 | if ((u32) mem & 3 && count >= 2) { |
807 | if (gdbstub_read_word(mem, ch) != 0) | 807 | if (gdbstub_read_word(mem, ch) != 0) |
808 | return 0; | 808 | return 0; |
809 | buf = pack_hex_byte(buf, ch[0]); | 809 | buf = hex_byte_pack(buf, ch[0]); |
810 | buf = pack_hex_byte(buf, ch[1]); | 810 | buf = hex_byte_pack(buf, ch[1]); |
811 | mem += 2; | 811 | mem += 2; |
812 | count -= 2; | 812 | count -= 2; |
813 | } | 813 | } |
@@ -815,10 +815,10 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault) | |||
815 | while (count >= 4) { | 815 | while (count >= 4) { |
816 | if (gdbstub_read_dword(mem, ch) != 0) | 816 | if (gdbstub_read_dword(mem, ch) != 0) |
817 | return 0; | 817 | return 0; |
818 | buf = pack_hex_byte(buf, ch[0]); | 818 | buf = hex_byte_pack(buf, ch[0]); |
819 | buf = pack_hex_byte(buf, ch[1]); | 819 | buf = hex_byte_pack(buf, ch[1]); |
820 | buf = pack_hex_byte(buf, ch[2]); | 820 | buf = hex_byte_pack(buf, ch[2]); |
821 | buf = pack_hex_byte(buf, ch[3]); | 821 | buf = hex_byte_pack(buf, ch[3]); |
822 | mem += 4; | 822 | mem += 4; |
823 | count -= 4; | 823 | count -= 4; |
824 | } | 824 | } |
@@ -826,8 +826,8 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault) | |||
826 | if (count >= 2) { | 826 | if (count >= 2) { |
827 | if (gdbstub_read_word(mem, ch) != 0) | 827 | if (gdbstub_read_word(mem, ch) != 0) |
828 | return 0; | 828 | return 0; |
829 | buf = pack_hex_byte(buf, ch[0]); | 829 | buf = hex_byte_pack(buf, ch[0]); |
830 | buf = pack_hex_byte(buf, ch[1]); | 830 | buf = hex_byte_pack(buf, ch[1]); |
831 | mem += 2; | 831 | mem += 2; |
832 | count -= 2; | 832 | count -= 2; |
833 | } | 833 | } |
@@ -835,7 +835,7 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault) | |||
835 | if (count >= 1) { | 835 | if (count >= 1) { |
836 | if (gdbstub_read_byte(mem, ch) != 0) | 836 | if (gdbstub_read_byte(mem, ch) != 0) |
837 | return 0; | 837 | return 0; |
838 | buf = pack_hex_byte(buf, ch[0]); | 838 | buf = hex_byte_pack(buf, ch[0]); |
839 | } | 839 | } |
840 | 840 | ||
841 | *buf = 0; | 841 | *buf = 0; |
@@ -1273,13 +1273,13 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep) | |||
1273 | ptr = mem2hex(title, ptr, sizeof(title) - 1, 0); | 1273 | ptr = mem2hex(title, ptr, sizeof(title) - 1, 0); |
1274 | 1274 | ||
1275 | hx = hex_asc_hi(excep >> 8); | 1275 | hx = hex_asc_hi(excep >> 8); |
1276 | ptr = pack_hex_byte(ptr, hx); | 1276 | ptr = hex_byte_pack(ptr, hx); |
1277 | hx = hex_asc_lo(excep >> 8); | 1277 | hx = hex_asc_lo(excep >> 8); |
1278 | ptr = pack_hex_byte(ptr, hx); | 1278 | ptr = hex_byte_pack(ptr, hx); |
1279 | hx = hex_asc_hi(excep); | 1279 | hx = hex_asc_hi(excep); |
1280 | ptr = pack_hex_byte(ptr, hx); | 1280 | ptr = hex_byte_pack(ptr, hx); |
1281 | hx = hex_asc_lo(excep); | 1281 | hx = hex_asc_lo(excep); |
1282 | ptr = pack_hex_byte(ptr, hx); | 1282 | ptr = hex_byte_pack(ptr, hx); |
1283 | 1283 | ||
1284 | ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0); | 1284 | ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0); |
1285 | *ptr = 0; | 1285 | *ptr = 0; |
@@ -1291,21 +1291,21 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep) | |||
1291 | ptr = mem2hex(tbcberr, ptr, sizeof(tbcberr) - 1, 0); | 1291 | ptr = mem2hex(tbcberr, ptr, sizeof(tbcberr) - 1, 0); |
1292 | 1292 | ||
1293 | hx = hex_asc_hi(bcberr >> 24); | 1293 | hx = hex_asc_hi(bcberr >> 24); |
1294 | ptr = pack_hex_byte(ptr, hx); | 1294 | ptr = hex_byte_pack(ptr, hx); |
1295 | hx = hex_asc_lo(bcberr >> 24); | 1295 | hx = hex_asc_lo(bcberr >> 24); |
1296 | ptr = pack_hex_byte(ptr, hx); | 1296 | ptr = hex_byte_pack(ptr, hx); |
1297 | hx = hex_asc_hi(bcberr >> 16); | 1297 | hx = hex_asc_hi(bcberr >> 16); |
1298 | ptr = pack_hex_byte(ptr, hx); | 1298 | ptr = hex_byte_pack(ptr, hx); |
1299 | hx = hex_asc_lo(bcberr >> 16); | 1299 | hx = hex_asc_lo(bcberr >> 16); |
1300 | ptr = pack_hex_byte(ptr, hx); | 1300 | ptr = hex_byte_pack(ptr, hx); |
1301 | hx = hex_asc_hi(bcberr >> 8); | 1301 | hx = hex_asc_hi(bcberr >> 8); |
1302 | ptr = pack_hex_byte(ptr, hx); | 1302 | ptr = hex_byte_pack(ptr, hx); |
1303 | hx = hex_asc_lo(bcberr >> 8); | 1303 | hx = hex_asc_lo(bcberr >> 8); |
1304 | ptr = pack_hex_byte(ptr, hx); | 1304 | ptr = hex_byte_pack(ptr, hx); |
1305 | hx = hex_asc_hi(bcberr); | 1305 | hx = hex_asc_hi(bcberr); |
1306 | ptr = pack_hex_byte(ptr, hx); | 1306 | ptr = hex_byte_pack(ptr, hx); |
1307 | hx = hex_asc_lo(bcberr); | 1307 | hx = hex_asc_lo(bcberr); |
1308 | ptr = pack_hex_byte(ptr, hx); | 1308 | ptr = hex_byte_pack(ptr, hx); |
1309 | 1309 | ||
1310 | ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0); | 1310 | ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0); |
1311 | *ptr = 0; | 1311 | *ptr = 0; |
@@ -1321,12 +1321,12 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep) | |||
1321 | * Send trap type (converted to signal) | 1321 | * Send trap type (converted to signal) |
1322 | */ | 1322 | */ |
1323 | *ptr++ = 'T'; | 1323 | *ptr++ = 'T'; |
1324 | ptr = pack_hex_byte(ptr, sigval); | 1324 | ptr = hex_byte_pack(ptr, sigval); |
1325 | 1325 | ||
1326 | /* | 1326 | /* |
1327 | * Send Error PC | 1327 | * Send Error PC |
1328 | */ | 1328 | */ |
1329 | ptr = pack_hex_byte(ptr, GDB_REGID_PC); | 1329 | ptr = hex_byte_pack(ptr, GDB_REGID_PC); |
1330 | *ptr++ = ':'; | 1330 | *ptr++ = ':'; |
1331 | ptr = mem2hex(®s->pc, ptr, 4, 0); | 1331 | ptr = mem2hex(®s->pc, ptr, 4, 0); |
1332 | *ptr++ = ';'; | 1332 | *ptr++ = ';'; |
@@ -1334,7 +1334,7 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep) | |||
1334 | /* | 1334 | /* |
1335 | * Send frame pointer | 1335 | * Send frame pointer |
1336 | */ | 1336 | */ |
1337 | ptr = pack_hex_byte(ptr, GDB_REGID_FP); | 1337 | ptr = hex_byte_pack(ptr, GDB_REGID_FP); |
1338 | *ptr++ = ':'; | 1338 | *ptr++ = ':'; |
1339 | ptr = mem2hex(®s->a3, ptr, 4, 0); | 1339 | ptr = mem2hex(®s->a3, ptr, 4, 0); |
1340 | *ptr++ = ';'; | 1340 | *ptr++ = ';'; |
@@ -1343,7 +1343,7 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep) | |||
1343 | * Send stack pointer | 1343 | * Send stack pointer |
1344 | */ | 1344 | */ |
1345 | ssp = (unsigned long) (regs + 1); | 1345 | ssp = (unsigned long) (regs + 1); |
1346 | ptr = pack_hex_byte(ptr, GDB_REGID_SP); | 1346 | ptr = hex_byte_pack(ptr, GDB_REGID_SP); |
1347 | *ptr++ = ':'; | 1347 | *ptr++ = ':'; |
1348 | ptr = mem2hex(&ssp, ptr, 4, 0); | 1348 | ptr = mem2hex(&ssp, ptr, 4, 0); |
1349 | *ptr++ = ';'; | 1349 | *ptr++ = ';'; |
diff --git a/kernel/debug/gdbstub.c b/kernel/debug/gdbstub.c index 34872482315e..c22d8c28ad84 100644 --- a/kernel/debug/gdbstub.c +++ b/kernel/debug/gdbstub.c | |||
@@ -217,7 +217,7 @@ void gdbstub_msg_write(const char *s, int len) | |||
217 | 217 | ||
218 | /* Pack in hex chars */ | 218 | /* Pack in hex chars */ |
219 | for (i = 0; i < wcount; i++) | 219 | for (i = 0; i < wcount; i++) |
220 | bufptr = pack_hex_byte(bufptr, s[i]); | 220 | bufptr = hex_byte_pack(bufptr, s[i]); |
221 | *bufptr = '\0'; | 221 | *bufptr = '\0'; |
222 | 222 | ||
223 | /* Move up */ | 223 | /* Move up */ |
@@ -249,7 +249,7 @@ char *kgdb_mem2hex(char *mem, char *buf, int count) | |||
249 | if (err) | 249 | if (err) |
250 | return NULL; | 250 | return NULL; |
251 | while (count > 0) { | 251 | while (count > 0) { |
252 | buf = pack_hex_byte(buf, *tmp); | 252 | buf = hex_byte_pack(buf, *tmp); |
253 | tmp++; | 253 | tmp++; |
254 | count--; | 254 | count--; |
255 | } | 255 | } |
@@ -411,14 +411,14 @@ static char *pack_threadid(char *pkt, unsigned char *id) | |||
411 | limit = id + (BUF_THREAD_ID_SIZE / 2); | 411 | limit = id + (BUF_THREAD_ID_SIZE / 2); |
412 | while (id < limit) { | 412 | while (id < limit) { |
413 | if (!lzero || *id != 0) { | 413 | if (!lzero || *id != 0) { |
414 | pkt = pack_hex_byte(pkt, *id); | 414 | pkt = hex_byte_pack(pkt, *id); |
415 | lzero = 0; | 415 | lzero = 0; |
416 | } | 416 | } |
417 | id++; | 417 | id++; |
418 | } | 418 | } |
419 | 419 | ||
420 | if (lzero) | 420 | if (lzero) |
421 | pkt = pack_hex_byte(pkt, 0); | 421 | pkt = hex_byte_pack(pkt, 0); |
422 | 422 | ||
423 | return pkt; | 423 | return pkt; |
424 | } | 424 | } |
@@ -486,7 +486,7 @@ static void gdb_cmd_status(struct kgdb_state *ks) | |||
486 | dbg_remove_all_break(); | 486 | dbg_remove_all_break(); |
487 | 487 | ||
488 | remcom_out_buffer[0] = 'S'; | 488 | remcom_out_buffer[0] = 'S'; |
489 | pack_hex_byte(&remcom_out_buffer[1], ks->signo); | 489 | hex_byte_pack(&remcom_out_buffer[1], ks->signo); |
490 | } | 490 | } |
491 | 491 | ||
492 | static void gdb_get_regs_helper(struct kgdb_state *ks) | 492 | static void gdb_get_regs_helper(struct kgdb_state *ks) |
@@ -954,7 +954,7 @@ int gdb_serial_stub(struct kgdb_state *ks) | |||
954 | /* Reply to host that an exception has occurred */ | 954 | /* Reply to host that an exception has occurred */ |
955 | ptr = remcom_out_buffer; | 955 | ptr = remcom_out_buffer; |
956 | *ptr++ = 'T'; | 956 | *ptr++ = 'T'; |
957 | ptr = pack_hex_byte(ptr, ks->signo); | 957 | ptr = hex_byte_pack(ptr, ks->signo); |
958 | ptr += strlen(strcpy(ptr, "thread:")); | 958 | ptr += strlen(strcpy(ptr, "thread:")); |
959 | int_to_threadref(thref, shadow_pid(current->pid)); | 959 | int_to_threadref(thref, shadow_pid(current->pid)); |
960 | ptr = pack_threadid(ptr, thref); | 960 | ptr = pack_threadid(ptr, thref); |