Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Luis <luis.machado.foss@gmail.com>
To: Hannes Domani <ssbssa@yahoo.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2 1/8] gdb/testsuite: Add Windows replacement for aligned_alloc
Date: Wed, 12 Aug 2026 23:00:53 +0100	[thread overview]
Message-ID: <9284f90c-cf85-4b3c-b8d8-d1631c9d257a@gmail.com> (raw)
In-Reply-To: <20260727174619.1089041-1-ssbssa@yahoo.de>

Hi,

Just wondering if there are any tests planned or if the current tests 
are enough and what their results are.

On 27/07/2026 18:42, Hannes Domani wrote:
> _aligned_malloc has swapped arguments, and you have to use _aligned_free
> to free the memory afterwards.
> 
> This is enough to make i386-sse.exp pass, and i386-avx.exp will pass at
> the end of this series.
> ---
> v2:
>    - Mention which test pass after the change in the commit message
> ---
>   gdb/testsuite/gdb.arch/i386-avx.c         |  2 +-
>   gdb/testsuite/gdb.arch/i386-sse.c         |  2 +-
>   gdb/testsuite/lib/precise-aligned-alloc.c | 20 ++++++++++++++++++++
>   3 files changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/gdb/testsuite/gdb.arch/i386-avx.c b/gdb/testsuite/gdb.arch/i386-avx.c
> index b6cd89e5bea..229093e5164 100644
> --- a/gdb/testsuite/gdb.arch/i386-avx.c
> +++ b/gdb/testsuite/gdb.arch/i386-avx.c
> @@ -116,7 +116,7 @@ main (int argc, char **argv)
>   
>     puts ("Bye!"); /* second breakpoint here */
>   
> -  free (allocated_ptr);
> +  aligned_free (allocated_ptr);
>   
>     return 0;
>   }
> diff --git a/gdb/testsuite/gdb.arch/i386-sse.c b/gdb/testsuite/gdb.arch/i386-sse.c
> index 21264ed74e7..5210aee12c3 100644
> --- a/gdb/testsuite/gdb.arch/i386-sse.c
> +++ b/gdb/testsuite/gdb.arch/i386-sse.c
> @@ -134,7 +134,7 @@ main (int argc, char **argv)
>         puts ("Bye!"); /* second breakpoint here */
>       }
>   
> -  free (allocated_ptr);
> +  aligned_free (allocated_ptr);
>   
>     return 0;
>   }
> diff --git a/gdb/testsuite/lib/precise-aligned-alloc.c b/gdb/testsuite/lib/precise-aligned-alloc.c
> index 888814f12ef..1db35528bc8 100644
> --- a/gdb/testsuite/lib/precise-aligned-alloc.c
> +++ b/gdb/testsuite/lib/precise-aligned-alloc.c
> @@ -21,6 +21,26 @@
>   #include <string.h>
>   #include <stdint.h>
>   
> +#ifdef _WIN32
> +static void *
> +aligned_alloc (size_t alignment, size_t size)
> +{
> +  return _aligned_malloc (size, alignment);
> +}
> +
> +static void
> +aligned_free (void *ptr)
> +{
> +  _aligned_free (ptr);
> +}
> +#else
> +static void
> +aligned_free (void *ptr)
> +{
> +  free (ptr);
> +}
> +#endif
> +
>   /* Return true if address P is ALIGNMENT-byte aligned.  */
>   
>   static int


  parent reply	other threads:[~2026-08-12 22:01 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260727174619.1089041-1-ssbssa.ref@yahoo.de>
2026-07-27 17:42 ` Hannes Domani
2026-07-27 17:42   ` [PATCH v2 2/8] Windows gdb: Use allocated buffer for CONTEXT Hannes Domani
2026-08-21 18:03     ` Tom Tromey
2026-08-21 18:37       ` Hannes Domani
2026-08-22  1:14         ` Tom Tromey
2026-07-27 17:42   ` [PATCH v2 3/8] Windows gdb: Remove mappings member from windows_per_inferior Hannes Domani
2026-08-21 18:06     ` Tom Tromey
2026-07-27 17:42   ` [PATCH v2 4/8] Windows gdb: Refactor getting pointer to register inside context Hannes Domani
2026-08-21 18:27     ` Tom Tromey
2026-07-27 17:42   ` [PATCH v2 5/8] Windows gdb: Prepare XState functions Hannes Domani
2026-08-21 18:22     ` Tom Tromey
2026-07-27 17:42   ` [PATCH v2 6/8] Windows gdb: Get available XState features Hannes Domani
2026-08-21 18:37     ` Tom Tromey
2026-07-27 17:42   ` [PATCH v2 7/8] Windows gdb: Implement XState (Intel AVX) support Hannes Domani
2026-08-10 17:25     ` Hannes Domani
2026-08-13  6:39       ` Joos, Christina
2026-08-26 14:28     ` Joos, Christina
2026-08-26 15:20       ` Hannes Domani
2026-08-27 10:42         ` Joos, Christina
2026-08-27 14:20           ` Hannes Domani
2026-08-27 15:17             ` Joos, Christina
2026-08-27 16:05               ` Hannes Domani
2026-08-27 16:30                 ` Joos, Christina
2026-07-27 17:42   ` [PATCH v2 8/8] Windows gdbserver: " Hannes Domani
2026-08-12 22:00   ` Luis [this message]
2026-08-12 22:08     ` [PATCH v2 1/8] gdb/testsuite: Add Windows replacement for aligned_alloc Hannes Domani
2026-08-21 17:56   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9284f90c-cf85-4b3c-b8d8-d1631c9d257a@gmail.com \
    --to=luis.machado.foss@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ssbssa@yahoo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox