This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH, testsuite] Adjust gdb.base/maint.exp for Windows hosts
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Pedro Alves <palves at redhat dot com>
- Cc: lgustavo at codesourcery dot com, gdb-patches at sourceware dot org
- Date: Mon, 23 Jun 2014 18:14:29 +0300
- Subject: Re: [PATCH, testsuite] Adjust gdb.base/maint.exp for Windows hosts
- Authentication-results: sourceware.org; auth=none
- References: <5396F67D dot 9080203 at codesourcery dot com> <53A83710 dot 2060001 at redhat dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Mon, 23 Jun 2014 15:17:52 +0100
> From: Pedro Alves <palves@redhat.com>
>
> > On Windows hosts, it looks like this:
> >
> > (gdb) maint set per-command off
> > Command execution time: 0.000000 (cpu), 0.000000 (wall)
> > #symtabs: 0 (+0), #primary symtabs: 0 (+0), #blocks: 0 (+0)
> >
> > The space summary isn't displayed because Windows hosts don't have
> > HAVE_SBRK defined.
>
> So that bit of code should be ported to Windows then IMO, IMO.
> The test failure is exactly serving as reminder. I believe
> VirtualQuery/VirtualQueryEx would be what to use.
GetProcessMemoryInfo sounds like a better candidate for this. You
want the PrivateUsage member of the structure it returns, I believe.
Btw, isn't 'sbrk(0)' not too meaningful on modern systems, since their
malloc implementation uses mmap?