This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Windows]Fix a bug which cause GDB.exe assert when try to run the inferior
- From: asmwarrior <asmwarrior at gmail dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 24 Feb 2014 15:10:31 +0800
- Subject: Re: [Windows]Fix a bug which cause GDB.exe assert when try to run the inferior
- Authentication-results: sourceware.org; auth=none
- References: <530612A8 dot 4000903 at gmail dot com> <5306A9BC dot 4080701 at codesourcery dot com> <5306EE2A dot 2060103 at gmail dot com> <5306FA43 dot 1070408 at codesourcery dot com> <83sirc532m dot fsf at gnu dot org> <530706DD dot 8060605 at codesourcery dot com> <530AEA6C dot 8050002 at codesourcery dot com>
On 2014-2-24 14:45, Yao Qi wrote:
> >
> > gdb:
> >
> > 2014-02-21 Yuanhui Zhang <asmwarrior@gmail.com>
> >
> > * windows-nat.c (windows_xfer_shared_libraries): Return
> > TARGET_XFER_EOF if LEN is zero to fix an assert failure when
> > requested object is TARGET_OBJECT_LIBRARIES.
> >
> Please update your patch to replace "len ?" with "len != 0 ?" and commit
> log we discussed here. You can push it in.
>
> Let me know if you don't have a commit access or have trouble on
> committing, I can commit this patch for you.
Hi, Yao, thanks. I was thinking that I won't need further change, because it was a tiny patch.
Anyway, would you mind to commit for me? I don't have commit access.
gdb/windows-nat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index a570a1a..b76d94d 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -2480,7 +2480,7 @@ windows_xfer_shared_libraries (struct target_ops *ops,
obstack_free (&obstack, NULL);
*xfered_len = (ULONGEST) len;
- return TARGET_XFER_OK;
+ return len != 0 ? TARGET_XFER_OK : TARGET_XFER_EOF;
}
The log message are much better than my original one.
gdb:
2014-02-21 Yuanhui Zhang <asmwarrior@gmail.com>
* windows-nat.c (windows_xfer_shared_libraries): Return
TARGET_XFER_EOF if LEN is zero to fix an assert failure when
requested object is TARGET_OBJECT_LIBRARIES.
Thanks for adjustment.
Yuanhui Zhang