* [PATCH v4 1/4] Fix styles in aix-thread.c to follow GNU style code.
@ 2026-10-05 11:44 Aditya Vidyadhar Kamath
2026-10-05 14:06 ` Simon Marchi
2026-10-05 14:19 ` Simon Marchi
0 siblings, 2 replies; 9+ messages in thread
From: Aditya Vidyadhar Kamath @ 2026-10-05 11:44 UTC (permalink / raw)
To: ulrich.weigand, simon.marchi, tom
Cc: gdb-patches, Aditya.Kamath1, sangamesh.swamy, Aditya Vidyadhar Kamath
From: Aditya Vidyadhar Kamath <aditya.kamath1@ibm.com>
https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards
As per GDB code guidelines making minor changes to follow before
cleaning up aix-thread.c legacy code.
The following things were done:
1: 80 length column maintained now.
2: Some functions changed from function() to function ()
3: Switch case also changed [only style] to follow the guideline.
---
gdb/aix-thread.c | 91 ++++++++++++++++++++++++++----------------------
1 file changed, 49 insertions(+), 42 deletions(-)
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 647ed063671..65b9c5f7479 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -299,16 +299,16 @@ ptrace_check (int req, int id, int ret)
req, id, ret, errno);
return ret == -1 ? 0 : 1;
}
- break;
- case PTT_READ_VEC:
- case PTT_READ_VSX:
- if (debug_aix_thread)
- gdb_printf (gdb_stdlog,
- "ptrace (%d, %d) = %d (errno = %d)\n",
- req, id, ret, errno);
- if (ret == -1)
- return -1;
- break;
+ break;
+ case PTT_READ_VEC:
+ case PTT_READ_VSX:
+ if (debug_aix_thread)
+ gdb_printf (gdb_stdlog,
+ "ptrace (%d, %d) = %d (errno = %d)\n",
+ req, id, ret, errno);
+ if (ret == -1)
+ return -1;
+ break;
}
error (_("aix-thread: ptrace (%d, %d) returned %d (errno = %d %s)"),
req, id, ret, errno, safe_strerror (errno));
@@ -368,7 +368,8 @@ pid_to_prc (ptid_t *ptidp)
the address of SYMBOLS[<i>].name. */
static int
-pdc_symbol_addrs (pthdb_user_t user_current_pid, pthdb_symbol_t *symbols, int count)
+pdc_symbol_addrs (pthdb_user_t user_current_pid, pthdb_symbol_t *symbols,
+ int count)
{
int i;
char *name;
@@ -447,13 +448,13 @@ pdc_read_regs (pthdb_user_t user_current_pid,
if (!ptrace64aix (PTT_READ_GPRS, tid,
(unsigned long) gprs64, 0, NULL))
memset (gprs64, 0, sizeof (gprs64));
- memcpy (context->gpr, gprs64, sizeof(gprs64));
+ memcpy (context->gpr, gprs64, sizeof (gprs64));
}
else
{
if (!ptrace32 (PTT_READ_GPRS, tid, (uintptr_t) gprs32, 0, NULL))
memset (gprs32, 0, sizeof (gprs32));
- memcpy (context->gpr, gprs32, sizeof(gprs32));
+ memcpy (context->gpr, gprs32, sizeof (gprs32));
}
}
@@ -462,7 +463,7 @@ pdc_read_regs (pthdb_user_t user_current_pid,
{
if (!ptrace32 (PTT_READ_FPRS, tid, (uintptr_t) fprs, 0, NULL))
memset (fprs, 0, sizeof (fprs));
- memcpy (context->fpr, fprs, sizeof(fprs));
+ memcpy (context->fpr, fprs, sizeof (fprs));
}
/* Special-purpose registers. */
@@ -473,49 +474,49 @@ pdc_read_regs (pthdb_user_t user_current_pid,
if (!ptrace64aix (PTT_READ_SPRS, tid,
(unsigned long) &sprs64, 0, NULL))
memset (&sprs64, 0, sizeof (sprs64));
- memcpy (&context->msr, &sprs64, sizeof(sprs64));
+ memcpy (&context->msr, &sprs64, sizeof (sprs64));
}
else
{
if (!ptrace32 (PTT_READ_SPRS, tid, (uintptr_t) &sprs32, 0, NULL))
memset (&sprs32, 0, sizeof (sprs32));
- memcpy (&context->msr, &sprs32, sizeof(sprs32));
+ memcpy (&context->msr, &sprs32, sizeof (sprs32));
}
}
/* vector registers. */
__vmx_context_t vmx;
- if (__power_vmx() && (flags & PTHDB_FLAG_REGS))
+ if (__power_vmx () && (flags & PTHDB_FLAG_REGS))
{
if (data->arch64)
{
if (!ptrace64aix (PTT_READ_VEC, tid, (long long) &vmx, 0, 0))
memset (&vmx, 0, sizeof (vmx));
- memcpy (&context->vmx, &vmx, sizeof(__vmx_context_t));
+ memcpy (&context->vmx, &vmx, sizeof (__vmx_context_t));
}
else
{
if (!ptrace32 (PTT_READ_VEC, tid, (long long) &vmx, 0, 0))
memset (&vmx, 0, sizeof (vmx));
- memcpy (&context->vmx, &vmx, sizeof(__vmx_context_t));
+ memcpy (&context->vmx, &vmx, sizeof (__vmx_context_t));
}
}
/* vsx registers. */
__vsx_context_t vsx;
- if (__power_vsx() && (flags & PTHDB_FLAG_REGS))
+ if (__power_vsx () && (flags & PTHDB_FLAG_REGS))
{
if (data->arch64)
{
if (!ptrace64aix (PTT_READ_VSX, tid, (long long) &vsx, 0, 0))
memset (&vsx, 0, sizeof (vsx));
- memcpy (&context->vsx, &vsx, sizeof(__vsx_context_t));
+ memcpy (&context->vsx, &vsx, sizeof (__vsx_context_t));
}
else
{
if (!ptrace32 (PTT_READ_VSX, tid, (long long) &vsx, 0, 0))
memset (&vsx, 0, sizeof (vsx));
- memcpy (&context->vsx, &vsx, sizeof(__vsx_context_t));
+ memcpy (&context->vsx, &vsx, sizeof (__vsx_context_t));
}
}
return 0;
@@ -576,7 +577,7 @@ pdc_write_regs (pthdb_user_t user_current_pid,
}
/* vector registers. */
- if (__power_vmx() && (flags & PTHDB_FLAG_REGS))
+ if (__power_vmx () && (flags & PTHDB_FLAG_REGS))
{
if (data->arch64)
ptrace64aix (PTT_WRITE_VEC, tid, (unsigned long) &context->vmx, 0, 0);
@@ -585,7 +586,7 @@ pdc_write_regs (pthdb_user_t user_current_pid,
}
/* vsx registers. */
- if (__power_vsx() && (flags & PTHDB_FLAG_REGS))
+ if (__power_vsx () && (flags & PTHDB_FLAG_REGS))
{
if (data->arch64)
ptrace64aix (PTT_WRITE_VSX, tid, (unsigned long) &context->vsx, 0, 0);
@@ -636,7 +637,8 @@ pdc_write_data (pthdb_user_t user_current_pid, void *buf,
if (debug_aix_thread)
gdb_printf (gdb_stdlog,
- "pdc_write_data (user_current_pid = %ld, buf = 0x%lx, addr = %s, len = %ld)\n",
+ "pdc_write_data (user_current_pid = %ld, buf = 0x%lx,"
+ " addr = %s, len = %ld)\n",
user_current_pid, (long) buf, hex_string (addr), len);
{
@@ -682,7 +684,8 @@ pdc_realloc (pthdb_user_t user_current_pid, void *buf, size_t len, void **bufp)
{
if (debug_aix_thread)
gdb_printf (gdb_stdlog,
- "pdc_realloc (user_current_pid = %ld, buf = 0x%lx, len = %ld, bufp = 0x%lx)\n",
+ "pdc_realloc (user_current_pid = %ld, buf = 0x%lx,"
+ " len = %ld, bufp = 0x%lx)\n",
user_current_pid, (long) buf, len, (long) bufp);
*bufp = xrealloc (buf, len);
if (debug_aix_thread)
@@ -1268,7 +1271,8 @@ supply_sprs32 (struct regcache *regcache,
function. */
static void
-fetch_regs_user_thread (struct regcache *regcache, pthdb_pthread_t pdtid)
+fetch_regs_user_thread (struct regcache *regcache,
+ pthdb_pthread_t pdtid)
{
struct gdbarch *gdbarch = regcache->arch ();
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
@@ -1381,7 +1385,7 @@ fetch_regs_kernel_thread (struct regcache *regcache, int regno,
else
ret = ptrace32 (PTT_READ_VEC, tid, (uintptr_t) &vmx, 0, 0);
if (ret < 0)
- memset(&vmx, 0, sizeof(__vmx_context_t));
+ memset (&vmx, 0, sizeof (__vmx_context_t));
for (i = 0; i < ppc_num_vrs; i++)
regcache->raw_supply (tdep->ppc_vr0_regnum + i, &(vmx.__vr[i]));
regcache->raw_supply (tdep->ppc_vrsave_regnum, &(vmx.__vrsave));
@@ -1398,7 +1402,7 @@ fetch_regs_kernel_thread (struct regcache *regcache, int regno,
else
ret = ptrace32 (PTT_READ_VSX, tid, (long long) &vsx, 0, 0);
if (ret < 0)
- memset(&vsx, 0, sizeof(__vsx_context_t));
+ memset (&vsx, 0, sizeof (__vsx_context_t));
for (i = 0; i < ppc_num_vshrs; i++)
regcache->raw_supply (tdep->ppc_vsr0_upper_regnum + i, &(vsx.__vsr_dw1[i]));
}
@@ -1461,7 +1465,7 @@ aix_thread_target::fetch_registers (struct regcache *regcache, int regno)
{
thread = current_inferior ()->find_thread (regcache->ptid ());
aix_thread_info *priv = get_aix_thread_info (thread);
- tid = regcache->ptid().lwp ();
+ tid = regcache->ptid ().lwp ();
if (tid == PTHDB_INVALID_TID)
fetch_regs_user_thread (regcache, priv->pdtid);
@@ -1480,9 +1484,10 @@ fill_altivec (const struct regcache *regcache, __vmx_context_t *vmx)
int regno;
for (regno = 0; regno < ppc_num_vrs; regno++)
- if (REG_VALID == regcache->get_register_status (tdep->ppc_vr0_regnum + regno))
+ if (REG_VALID == regcache->get_register_status
+ (tdep->ppc_vr0_regnum + regno))
regcache->raw_collect (tdep->ppc_vr0_regnum + regno,
- &(vmx->__vr[regno]));
+ &(vmx->__vr[regno]));
if (REG_VALID == regcache->get_register_status (tdep->ppc_vrsave_regnum))
regcache->raw_collect (tdep->ppc_vrsave_regnum, &(vmx->__vrsave));
@@ -1500,7 +1505,8 @@ fill_vsx (const struct regcache *regcache, __vsx_context_t *vsx)
int regno;
for (regno = 0; regno < ppc_num_vshrs; regno++)
- if (REG_VALID == regcache->get_register_status ( tdep->ppc_vsr0_upper_regnum + regno))
+ if (REG_VALID == regcache->get_register_status
+ (tdep->ppc_vsr0_upper_regnum + regno))
regcache->raw_collect (tdep->ppc_vsr0_upper_regnum + regno,
&(vsx->__vsr_dw1[0]) + regno);
}
@@ -1630,7 +1636,8 @@ fill_sprs32 (const struct regcache *regcache,
but I doubt it's worth the effort. */
static void
-store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
+store_regs_user_thread (const struct regcache *regcache,
+ pthdb_pthread_t pdtid)
{
struct gdbarch *gdbarch = regcache->arch ();
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
@@ -1656,9 +1663,9 @@ store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
/* Fill altivec-registers. */
- if (__power_vmx())
+ if (__power_vmx ())
{
- memset(&vmx, 0, sizeof(__vmx_context_t));
+ memset (&vmx, 0, sizeof (__vmx_context_t));
for (i = 0; i < ppc_num_vrs; i++)
if (REG_VALID == regcache->get_register_status (tdep->ppc_vr0_regnum + i))
{
@@ -1674,9 +1681,9 @@ store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
/* Fill vsx registers. */
- if (__power_vsx())
+ if (__power_vsx ())
{
- memset(&vsx, 0, sizeof(__vsx_context_t));
+ memset (&vsx, 0, sizeof (__vsx_context_t));
for (i = 0; i < ppc_num_vshrs; i++)
if (REG_VALID == regcache->get_register_status (tdep->ppc_vsr0_regnum + i))
{
@@ -1866,7 +1873,7 @@ store_regs_kernel_thread (const struct regcache *regcache, int regno,
&& regno <= tdep->ppc_vrsave_regnum)))
{
__vmx_context_t vmx;
- if (__power_vmx())
+ if (__power_vmx ())
{
if (data->arch64)
ret = ptrace64aix (PTT_READ_VEC, tid, (long long) &vmx, 0, 0);
@@ -1874,7 +1881,7 @@ store_regs_kernel_thread (const struct regcache *regcache, int regno,
ret = ptrace32 (PTT_READ_VEC, tid, (long long) &vmx, 0, 0);
if (ret > 0)
{
- fill_altivec(regcache, &vmx);
+ fill_altivec (regcache, &vmx);
if (data->arch64)
ret = ptrace64aix (PTT_WRITE_VEC, tid, (long long) &vmx, 0, 0);
else
@@ -1887,11 +1894,11 @@ store_regs_kernel_thread (const struct regcache *regcache, int regno,
/* VSX registers. */
if (tdep->ppc_vsr0_upper_regnum != -1 && (regno == -1
- || (regno >=tdep->ppc_vsr0_upper_regnum
+ || (regno >= tdep->ppc_vsr0_upper_regnum
&& regno < tdep->ppc_vsr0_upper_regnum + ppc_num_vshrs)))
{
__vsx_context_t vsx;
- if (__power_vsx())
+ if (__power_vsx ())
{
if (data->arch64)
ret = ptrace64aix (PTT_READ_VSX, tid, (long long) &vsx, 0, 0);
--
2.51.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 1/4] Fix styles in aix-thread.c to follow GNU style code.
2026-10-05 11:44 [PATCH v4 1/4] Fix styles in aix-thread.c to follow GNU style code Aditya Vidyadhar Kamath
@ 2026-10-05 14:06 ` Simon Marchi
2026-10-05 17:16 ` Aditya Kamath
2026-10-05 14:19 ` Simon Marchi
1 sibling, 1 reply; 9+ messages in thread
From: Simon Marchi @ 2026-10-05 14:06 UTC (permalink / raw)
To: Aditya Vidyadhar Kamath, ulrich.weigand, tom
Cc: gdb-patches, Aditya.Kamath1, sangamesh.swamy
On 10/5/26 7:44 AM, Aditya Vidyadhar Kamath wrote:
> From: Aditya Vidyadhar Kamath <aditya.kamath1@ibm.com>
>
> https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards
> As per GDB code guidelines making minor changes to follow before
> cleaning up aix-thread.c legacy code.
>
> The following things were done:
>
> 1: 80 length column maintained now.
> 2: Some functions changed from function() to function ()
> 3: Switch case also changed [only style] to follow the guideline.
Hi Aditya,
How do you send your patch series exactly? It looks like you send each
message separately. This results in four messages unrelated to each
other, making it hard to follow the whole series, or to grab the full
series with a tool like "b4".
https://sourceware.org/gdb/wiki/DeveloperTips#Downloading_and_applying_patches_from_the_mailing_list
I would suggest using git-send-email to send your series. No need to
re-send this one, but for the future.
Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 1/4] Fix styles in aix-thread.c to follow GNU style code.
2026-10-05 11:44 [PATCH v4 1/4] Fix styles in aix-thread.c to follow GNU style code Aditya Vidyadhar Kamath
2026-10-05 14:06 ` Simon Marchi
@ 2026-10-05 14:19 ` Simon Marchi
2026-10-05 18:54 ` Aditya Kamath
1 sibling, 1 reply; 9+ messages in thread
From: Simon Marchi @ 2026-10-05 14:19 UTC (permalink / raw)
To: Aditya Vidyadhar Kamath, ulrich.weigand, tom
Cc: gdb-patches, Aditya.Kamath1, sangamesh.swamy
On 10/5/26 7:44 AM, Aditya Vidyadhar Kamath wrote:
> @@ -1268,7 +1271,8 @@ supply_sprs32 (struct regcache *regcache,
> function. */
>
> static void
> -fetch_regs_user_thread (struct regcache *regcache, pthdb_pthread_t pdtid)
> +fetch_regs_user_thread (struct regcache *regcache,
> + pthdb_pthread_t pdtid)
This didn't need to be changed.
> @@ -1630,7 +1636,8 @@ fill_sprs32 (const struct regcache *regcache,
> but I doubt it's worth the effort. */
>
> static void
> -store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
> +store_regs_user_thread (const struct regcache *regcache,
> + pthdb_pthread_t pdtid)
This was fine at exactly 80 columns.
There are still many formatting problems in the file (bad alignment,
missing space, etc), so if we're doing this change we might as well do
it right. I would suggest running clang-format on the whole file.
There will be a lot of unwanted changes, but also a lot of good ones.
Using an interactive diff tool (like meld), you can easily pick the
changes you want and revert those you don't want.
Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH v4 1/4] Fix styles in aix-thread.c to follow GNU style code.
2026-10-05 14:06 ` Simon Marchi
@ 2026-10-05 17:16 ` Aditya Kamath
2026-10-05 17:28 ` Aditya Kamath
0 siblings, 1 reply; 9+ messages in thread
From: Aditya Kamath @ 2026-10-05 17:16 UTC (permalink / raw)
To: Simon Marchi, Aditya Vidyadhar Kamath, Ulrich Weigand, tom
Cc: gdb-patches, SANGAMESH MALLAYYA
[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]
Hi Simon,
>Hi Aditya,
>How do you send your patch series exactly? It looks like you send each
>message separately. This results in four messages unrelated to each
>other, making it hard to follow the whole series, or to grab the full
>series with a tool like "b4".
https://urldefense.proofpoint.com/v2/url?u=https-3A__sourceware.org_gdb_wiki_DeveloperTips-23Downloading-5Fand-5Fapplying-5Fpatches-5Ffrom-5Fthe-5Fmailing-5Flist&d=DwICaQ&c=BSDicqBQBDjDI9RkVyTcHQ&r=f-oUQ8ByG1nZ71OI9p76qywCPh7mxzU69hBYnkP9Nis&m=4rkTNUU2a8RN4d7A-qlBn6UpHX_TRYQ7KwYxbgmBw-VuBXTN5MYBhHrehbX4pT47&s=CxDjQqv61ItIbC2hFedv8-yApQgu2BJB-pVtLnQstZM&e=
>I would suggest using git-send-email to send your series. No need to
>re-send this one, but for the future.
I use git-send email only.
Here is what I do.
First git add <file>, sometime I use git add -p <file> to split my hunks.
The git commit and write my commit message.
Then git format-patch <patch_no> <commit_hash> -o <patch_directory> -“Version”
Ex: git format-patch -4 1317570d6869c3b09bea5e9a6c032195e049dcb2 -o /tls_patches/aix-thread-changes/v4/ -“v4"
Then finally I do
git send-email --to=ulrich.weigand@de.ibm.com --to=simon.marchi@polymtl.ca --to=tom@tromey.com --cc=gdb-patches@sourceware.org --cc=Aditya.Kamath1@ibm.com --cc=sangamesh.swamy@in.ibm.com v4-0005-Fix-32-bit-GPR-and-SPR-register-reads-writes-in-pthd.patch
One by one I send using 4 commands.
Let me know if I need to change something.
Thanks and regards,
Aditya.
[-- Attachment #2: Type: text/html, Size: 6116 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH v4 1/4] Fix styles in aix-thread.c to follow GNU style code.
2026-10-05 17:16 ` Aditya Kamath
@ 2026-10-05 17:28 ` Aditya Kamath
2026-10-05 17:35 ` Simon Marchi
0 siblings, 1 reply; 9+ messages in thread
From: Aditya Kamath @ 2026-10-05 17:28 UTC (permalink / raw)
To: Simon Marchi, Aditya Vidyadhar Kamath, Ulrich Weigand, tom
Cc: gdb-patches, SANGAMESH MALLAYYA
[-- Attachment #1: Type: text/plain, Size: 680 bytes --]
Hi Simon,
>git send-email --to=ulrich.weigand@de.ibm.com --to=simon.marchi@polymtl.ca >--to=tom@tromey.com --cc=gdb-patches@sourceware.org —>cc=Aditya.Kamath1@ibm.com --cc=sangamesh.swamy@in.ibm.com v4-0005->Fix-32-bit-GPR-and-SPR-register-reads-writes-in-pthd.patch
>One by one I send using 4 commands.
From the link you shared, I realized that the expected workflow is:
git am -3 <patch files...>
which means I should send the entire patch series using a single
git send-email invocation rather than sending each patch separately.
Thanks for pointing me to that documentation.
I'll do that for future patch series.
Thanks and regards,
Aditya.
[-- Attachment #2: Type: text/html, Size: 4061 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 1/4] Fix styles in aix-thread.c to follow GNU style code.
2026-10-05 17:28 ` Aditya Kamath
@ 2026-10-05 17:35 ` Simon Marchi
0 siblings, 0 replies; 9+ messages in thread
From: Simon Marchi @ 2026-10-05 17:35 UTC (permalink / raw)
To: Aditya Kamath, Aditya Vidyadhar Kamath, Ulrich Weigand, tom
Cc: gdb-patches, SANGAMESH MALLAYYA
On 10/5/26 1:28 PM, Aditya Kamath wrote:
> Hi Simon,
>
>>git send-email --to=ulrich.weigand@de.ibm.com --to=simon.marchi@polymtl.ca >--to=tom@tromey.com --cc=gdb-patches@sourceware.org —>cc=Aditya.Kamath1@ibm.com --cc=sangamesh.swamy@in.ibm.com v4-0005->Fix-32-bit-GPR-and-SPR-register-reads-writes-in-pthd.patch
>
>
>
>>One by one I send using 4 commands.
>
>
> From the link you shared, I realized that the expected workflow is:
>
> git am -3 <patch files...>
>
> which means I should send the entire patch series using a single
>
> git send-email invocation rather than sending each patch separately.
>
> Thanks for pointing me to that documentation.
>
> I'll do that for future patch series.
Exactly, if you want to send the top 4 commits as one series, you can do
something like:
$ git send-email HEAD~4 ...
All 4 messages will be linked together people's mail inbox (if they have
enabled threading) and on the web archives.
Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH v4 1/4] Fix styles in aix-thread.c to follow GNU style code.
2026-10-05 14:19 ` Simon Marchi
@ 2026-10-05 18:54 ` Aditya Kamath
2026-10-05 20:06 ` Simon Marchi
0 siblings, 1 reply; 9+ messages in thread
From: Aditya Kamath @ 2026-10-05 18:54 UTC (permalink / raw)
To: Simon Marchi, Aditya Vidyadhar Kamath, Ulrich Weigand, tom
Cc: gdb-patches, SANGAMESH MALLAYYA
[-- Attachment #1: Type: text/plain, Size: 829 bytes --]
Hi Simon,
Thank you for the update. I have made the changes as per your suggestion. Sending a v5 version of the same.
>There are still many formatting problems in the file (bad alignment,
>missing space, etc), so if we're doing this change we might as well do
>it right. I would suggest running clang-format on the whole file.
>There will be a lot of unwanted changes, but also a lot of good ones.
>Using an interactive diff tool (like meld), you can easily pick the
>changes you want and revert those you don't want.
We do not have meld on AIX but that is okay. Ran
/home/clang+llvm-23.1.2-powerpc64-ibm-aix-7.2/bin/clang-format -style=GNU -i gdb/aix-thread.c
And then made changes manually, then tested.
Thanks for the suggestion. It was pretty useful.
Have a nice day ahead.
Regards,
Aditya.
[-- Attachment #2: Type: text/html, Size: 3025 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 1/4] Fix styles in aix-thread.c to follow GNU style code.
2026-10-05 18:54 ` Aditya Kamath
@ 2026-10-05 20:06 ` Simon Marchi
2026-10-06 13:23 ` Aditya Kamath
0 siblings, 1 reply; 9+ messages in thread
From: Simon Marchi @ 2026-10-05 20:06 UTC (permalink / raw)
To: Aditya Kamath, Aditya Vidyadhar Kamath, Ulrich Weigand, tom
Cc: gdb-patches, SANGAMESH MALLAYYA
On 10/5/26 2:54 PM, Aditya Kamath wrote:
> Hi Simon,
>
> Thank you for the update. I have made the changes as per your suggestion. Sending a v5 version of the same.
>
>>There are still many formatting problems in the file (bad alignment,
>>missing space, etc), so if we're doing this change we might as well do
>>it right. I would suggest running clang-format on the whole file.
>>There will be a lot of unwanted changes, but also a lot of good ones.
>>Using an interactive diff tool (like meld), you can easily pick the
>>changes you want and revert those you don't want.
>
> We do not have meld on AIX but that is okay. Ran
> /home/clang+llvm-23.1.2-powerpc64-ibm-aix-7.2/bin/clang-format -style=GNU -i gdb/aix-thread.c
>
> And then made changes manually, then tested.
>
> Thanks for the suggestion. It was pretty useful.
Btw, if you have it in your clang installation, another useful tool is
git-clang-format. It allows you to ask clang-format to reformat only
the lines you touched in a given commit. This helps to quickly verify
the formatting of a given patch. Again, not all changes made by
clang-format are good for us, so you then have to manually accept or
reject the changes it did.
Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH v4 1/4] Fix styles in aix-thread.c to follow GNU style code.
2026-10-05 20:06 ` Simon Marchi
@ 2026-10-06 13:23 ` Aditya Kamath
0 siblings, 0 replies; 9+ messages in thread
From: Aditya Kamath @ 2026-10-06 13:23 UTC (permalink / raw)
To: Simon Marchi, Aditya Vidyadhar Kamath, Ulrich Weigand, tom
Cc: gdb-patches, SANGAMESH MALLAYYA
[-- Attachment #1: Type: text/plain, Size: 522 bytes --]
Hi Simon,
>Btw, if you have it in your clang installation, another useful tool is
>git-clang-format. It allows you to ask clang-format to reformat only
>the lines you touched in a given commit. This helps to quickly verify
>the formatting of a given patch. Again, not all changes made by
>clang-format are good for us, so you then have to manually accept or
>reject the changes it did.
Yes, I used this binary and tried. Pretty useful. Going to use this for the coming patches. Thanks.
Regards,
Aditya.
[-- Attachment #2: Type: text/html, Size: 1226 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-10-06 13:24 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-05 11:44 [PATCH v4 1/4] Fix styles in aix-thread.c to follow GNU style code Aditya Vidyadhar Kamath
2026-10-05 14:06 ` Simon Marchi
2026-10-05 17:16 ` Aditya Kamath
2026-10-05 17:28 ` Aditya Kamath
2026-10-05 17:35 ` Simon Marchi
2026-10-05 14:19 ` Simon Marchi
2026-10-05 18:54 ` Aditya Kamath
2026-10-05 20:06 ` Simon Marchi
2026-10-06 13:23 ` Aditya Kamath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox