kernel,debug: SPARC KGDB stub strcpy fix
PATCH 3/5 kernel,debug: SPARC KGDB stub strcpy fix
Works aroung the fact that strcpy with a constant string is converted to memcpy by gcc and that memcpy in SPARC returns 0.
Signed-off-by Konrad Eisele <[email protected]>
--- kernel/debug/gdbstub.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
kernel/debug/gdbstub.c +2 -1
@@ -946,7 +946,8 @@ int gdb_serial_stub(struct kgdb_state *ks) ptr = remcom_out_buffer; *ptr++ ='T' ; ptr =pack_hex_byte (ptr, ks->signo); - ptr +=strlen (strcpy (ptr,"thread:" )); +strcpy (ptr,"thread:" ); + ptr +=strlen (ptr);int_to_threadref (thref,shadow_pid (current->pid)); ptr =pack_threadid (ptr, thref); *ptr++ =';' ;
Signature · 1 line
1.6.4.1
PATCH 3/5 kernel,debug: SPARC KGDB stub strcpy fix
Works aroung the fact that strcpy with a constant string is converted to memcpy by gcc and that memcpy in SPARC returns 0.
Signed-off-by Konrad Eisele <[email protected]>
--- kernel/debug/gdbstub.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
kernel/debug/gdbstub.c +2 -1
@@ -946,7 +946,8 @@ int gdb_serial_stub(struct kgdb_state *ks) ptr = remcom_out_buffer; *ptr++ ='T' ; ptr =pack_hex_byte (ptr, ks->signo); - ptr +=strlen (strcpy (ptr,"thread:" )); +strcpy (ptr,"thread:" ); + ptr +=strlen (ptr);int_to_threadref (thref,shadow_pid (current->pid)); ptr =pack_threadid (ptr, thref); *ptr++ =';' ;
Signature · 1 line
1.6.4.1