projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20c4eb4
)
gdb: LoongArch: Use GDB style to check readbuf and writebuf
author
Tiezhu Yang
<yangtiezhu@loongson.cn>
Tue, 10 May 2022 11:50:31 +0000
(19:50 +0800)
committer
Tiezhu Yang
<yangtiezhu@loongson.cn>
Tue, 10 May 2022 14:25:53 +0000
(22:25 +0800)
The GDB style is to write 'if (readbuf != nullptr)', and the same for
writebuf.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
gdb/loongarch-tdep.c
patch
|
blob
|
history
diff --git
a/gdb/loongarch-tdep.c
b/gdb/loongarch-tdep.c
index 28f04094f640119e4661c27f8dc7023f7151cf54..8e74c9b779dac7bf18c56d0ed5698f8a0b15eba2 100644
(file)
--- a/
gdb/loongarch-tdep.c
+++ b/
gdb/loongarch-tdep.c
@@
-269,9
+269,9
@@
loongarch_return_value (struct gdbarch *gdbarch, struct value *function,
}
/* Extract the return value from the register where it was stored. */
- if (readbuf)
+ if (readbuf
!= nullptr
)
regcache->raw_read_part (regnum, 0, len, readbuf);
- if (writebuf)
+ if (writebuf
!= nullptr
)
regcache->raw_write_part (regnum, 0, len, writebuf);
return RETURN_VALUE_REGISTER_CONVENTION;