This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: --pid and --core
> There's a wrinkle. The 'int count' variable that was originally
> used in the loop, was also used to do a last resort stack alignment in
> captured_main's entry.
>
> #if defined (ALIGN_STACK_ON_STARTUP)
> i = (int) &count & 0x03;
> if (i != 0)
> alloca (4 - i);
> #endif
>
> ALIGN_STACK_ON_STARTUP isn't defined in any target/host
> anymore, and if it was, count is in the middle of the stack frame
> for long and nobody complained. We can safely
> remove it.
I agree.
> 2008-01-03 Pedro Alves <pedro@codesourcery.com>
>
> * main.c (captured_main): Remove 'count' varible and the
> ALIGN_STACK_ON_ENTRY block that used it. Error out if --core and
> --pid options were issued simultaneously. If an explicit pid
> option was passed, don't fallback to core file. Detect extra
> arguments better in the presence of explicit pid or core
> arguments.
This part is OK, please go ahead and commit.
Thanks,
--
Joel