@@ -798,44 +798,44 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault)
798798 if ((u32 ) mem & 1 && count >= 1 ) {
799799 if (gdbstub_read_byte (mem , ch ) != 0 )
800800 return 0 ;
801- buf = pack_hex_byte (buf , ch [0 ]);
801+ buf = hex_byte_pack (buf , ch [0 ]);
802802 mem ++ ;
803803 count -- ;
804804 }
805805
806806 if ((u32 ) mem & 3 && count >= 2 ) {
807807 if (gdbstub_read_word (mem , ch ) != 0 )
808808 return 0 ;
809- buf = pack_hex_byte (buf , ch [0 ]);
810- buf = pack_hex_byte (buf , ch [1 ]);
809+ buf = hex_byte_pack (buf , ch [0 ]);
810+ buf = hex_byte_pack (buf , ch [1 ]);
811811 mem += 2 ;
812812 count -= 2 ;
813813 }
814814
815815 while (count >= 4 ) {
816816 if (gdbstub_read_dword (mem , ch ) != 0 )
817817 return 0 ;
818- buf = pack_hex_byte (buf , ch [0 ]);
819- buf = pack_hex_byte (buf , ch [1 ]);
820- buf = pack_hex_byte (buf , ch [2 ]);
821- buf = pack_hex_byte (buf , ch [3 ]);
818+ buf = hex_byte_pack (buf , ch [0 ]);
819+ buf = hex_byte_pack (buf , ch [1 ]);
820+ buf = hex_byte_pack (buf , ch [2 ]);
821+ buf = hex_byte_pack (buf , ch [3 ]);
822822 mem += 4 ;
823823 count -= 4 ;
824824 }
825825
826826 if (count >= 2 ) {
827827 if (gdbstub_read_word (mem , ch ) != 0 )
828828 return 0 ;
829- buf = pack_hex_byte (buf , ch [0 ]);
830- buf = pack_hex_byte (buf , ch [1 ]);
829+ buf = hex_byte_pack (buf , ch [0 ]);
830+ buf = hex_byte_pack (buf , ch [1 ]);
831831 mem += 2 ;
832832 count -= 2 ;
833833 }
834834
835835 if (count >= 1 ) {
836836 if (gdbstub_read_byte (mem , ch ) != 0 )
837837 return 0 ;
838- buf = pack_hex_byte (buf , ch [0 ]);
838+ buf = hex_byte_pack (buf , ch [0 ]);
839839 }
840840
841841 * buf = 0 ;
@@ -1273,13 +1273,13 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep)
12731273 ptr = mem2hex (title , ptr , sizeof (title ) - 1 , 0 );
12741274
12751275 hx = hex_asc_hi (excep >> 8 );
1276- ptr = pack_hex_byte (ptr , hx );
1276+ ptr = hex_byte_pack (ptr , hx );
12771277 hx = hex_asc_lo (excep >> 8 );
1278- ptr = pack_hex_byte (ptr , hx );
1278+ ptr = hex_byte_pack (ptr , hx );
12791279 hx = hex_asc_hi (excep );
1280- ptr = pack_hex_byte (ptr , hx );
1280+ ptr = hex_byte_pack (ptr , hx );
12811281 hx = hex_asc_lo (excep );
1282- ptr = pack_hex_byte (ptr , hx );
1282+ ptr = hex_byte_pack (ptr , hx );
12831283
12841284 ptr = mem2hex (crlf , ptr , sizeof (crlf ) - 1 , 0 );
12851285 * ptr = 0 ;
@@ -1291,21 +1291,21 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep)
12911291 ptr = mem2hex (tbcberr , ptr , sizeof (tbcberr ) - 1 , 0 );
12921292
12931293 hx = hex_asc_hi (bcberr >> 24 );
1294- ptr = pack_hex_byte (ptr , hx );
1294+ ptr = hex_byte_pack (ptr , hx );
12951295 hx = hex_asc_lo (bcberr >> 24 );
1296- ptr = pack_hex_byte (ptr , hx );
1296+ ptr = hex_byte_pack (ptr , hx );
12971297 hx = hex_asc_hi (bcberr >> 16 );
1298- ptr = pack_hex_byte (ptr , hx );
1298+ ptr = hex_byte_pack (ptr , hx );
12991299 hx = hex_asc_lo (bcberr >> 16 );
1300- ptr = pack_hex_byte (ptr , hx );
1300+ ptr = hex_byte_pack (ptr , hx );
13011301 hx = hex_asc_hi (bcberr >> 8 );
1302- ptr = pack_hex_byte (ptr , hx );
1302+ ptr = hex_byte_pack (ptr , hx );
13031303 hx = hex_asc_lo (bcberr >> 8 );
1304- ptr = pack_hex_byte (ptr , hx );
1304+ ptr = hex_byte_pack (ptr , hx );
13051305 hx = hex_asc_hi (bcberr );
1306- ptr = pack_hex_byte (ptr , hx );
1306+ ptr = hex_byte_pack (ptr , hx );
13071307 hx = hex_asc_lo (bcberr );
1308- ptr = pack_hex_byte (ptr , hx );
1308+ ptr = hex_byte_pack (ptr , hx );
13091309
13101310 ptr = mem2hex (crlf , ptr , sizeof (crlf ) - 1 , 0 );
13111311 * ptr = 0 ;
@@ -1321,20 +1321,20 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep)
13211321 * Send trap type (converted to signal)
13221322 */
13231323 * ptr ++ = 'T' ;
1324- ptr = pack_hex_byte (ptr , sigval );
1324+ ptr = hex_byte_pack (ptr , sigval );
13251325
13261326 /*
13271327 * Send Error PC
13281328 */
1329- ptr = pack_hex_byte (ptr , GDB_REGID_PC );
1329+ ptr = hex_byte_pack (ptr , GDB_REGID_PC );
13301330 * ptr ++ = ':' ;
13311331 ptr = mem2hex (& regs -> pc , ptr , 4 , 0 );
13321332 * ptr ++ = ';' ;
13331333
13341334 /*
13351335 * Send frame pointer
13361336 */
1337- ptr = pack_hex_byte (ptr , GDB_REGID_FP );
1337+ ptr = hex_byte_pack (ptr , GDB_REGID_FP );
13381338 * ptr ++ = ':' ;
13391339 ptr = mem2hex (& regs -> a3 , ptr , 4 , 0 );
13401340 * ptr ++ = ';' ;
@@ -1343,7 +1343,7 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep)
13431343 * Send stack pointer
13441344 */
13451345 ssp = (unsigned long ) (regs + 1 );
1346- ptr = pack_hex_byte (ptr , GDB_REGID_SP );
1346+ ptr = hex_byte_pack (ptr , GDB_REGID_SP );
13471347 * ptr ++ = ':' ;
13481348 ptr = mem2hex (& ssp , ptr , 4 , 0 );
13491349 * ptr ++ = ';' ;
0 commit comments