Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] indent fix, win32-nat.c
@ 2004-07-01 21:36 Michael Snyder
  2004-07-01 23:05 ` Christopher Faylor
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Snyder @ 2004-07-01 21:36 UTC (permalink / raw)
  To: gdb-patches, cgf; +Cc: Corinna Vinschen

[-- Attachment #1: Type: text/plain, Size: 116 bytes --]

Chris, hope you don't mind, this seemed pretty obvious.
Indentation seems to have gotten whacked out of line here.


[-- Attachment #2: win32-nat.indent --]
[-- Type: text/plain, Size: 4334 bytes --]

2004-07-01  Michael Snyder  <msnyder@redhat.com>

	* win32-nat.c (core_dll_symbols_add): Re-indent a small section
	that seems to have gotten whacked out of line.

Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.93
diff -p -r1.93 win32-nat.c
*** win32-nat.c	29 Jun 2004 15:37:31 -0000	1.93
--- win32-nat.c	1 Jul 2004 21:32:11 -0000
*************** core_dll_symbols_add (char *dll_name, DW
*** 2267,2331 ****
        }
    }
  
!     register_loaded_dll (dll_name, base_addr + 0x1000);
!     solib_symbols_add (dll_name, 0, (CORE_ADDR) base_addr + 0x1000);
  
!   out:
!     return 1;
!   }
! 
!   typedef struct
!   {
!     struct target_ops *target;
!     bfd_vma addr;
!   } map_code_section_args;
! 
!   static void
!   map_single_dll_code_section (bfd * abfd, asection * sect, void *obj)
!   {
!     int old;
!     int update_coreops;
!     struct section_table *new_target_sect_ptr;
! 
!     map_code_section_args *args = (map_code_section_args *) obj;
!     struct target_ops *target = args->target;
!     if (sect->flags & SEC_CODE)
!       {
! 	update_coreops = core_ops.to_sections == target->to_sections;
! 
! 	if (target->to_sections)
! 	  {
! 	    old = target->to_sections_end - target->to_sections;
! 	    target->to_sections = (struct section_table *)
! 	      xrealloc ((char *) target->to_sections,
! 			(sizeof (struct section_table)) * (1 + old));
! 	  }
! 	else
! 	  {
! 	    old = 0;
! 	    target->to_sections = (struct section_table *)
! 	      xmalloc ((sizeof (struct section_table)));
! 	  }
! 	target->to_sections_end = target->to_sections + (1 + old);
! 
! 	/* Update the to_sections field in the core_ops structure
! 	   if needed.  */
! 	if (update_coreops)
! 	  {
! 	    core_ops.to_sections = target->to_sections;
! 	    core_ops.to_sections_end = target->to_sections_end;
! 	  }
! 	new_target_sect_ptr = target->to_sections + old;
! 	new_target_sect_ptr->addr = args->addr + bfd_section_vma (abfd, sect);
! 	new_target_sect_ptr->endaddr = args->addr + bfd_section_vma (abfd, sect) +
! 	  bfd_section_size (abfd, sect);;
! 	new_target_sect_ptr->the_bfd_section = sect;
! 	new_target_sect_ptr->bfd = abfd;
!       }
!   }
  
!   static int
!   dll_code_sections_add (const char *dll_name, int base_addr, struct target_ops *target)
  {
    bfd *dll_bfd;
    map_code_section_args map_args;
--- 2267,2331 ----
        }
    }
  
!   register_loaded_dll (dll_name, base_addr + 0x1000);
!   solib_symbols_add (dll_name, 0, (CORE_ADDR) base_addr + 0x1000);
  
!  out:
!   return 1;
! }
! 
! typedef struct
! {
!   struct target_ops *target;
!   bfd_vma addr;
! } map_code_section_args;
! 
! static void
! map_single_dll_code_section (bfd * abfd, asection * sect, void *obj)
! {
!   int old;
!   int update_coreops;
!   struct section_table *new_target_sect_ptr;
! 
!   map_code_section_args *args = (map_code_section_args *) obj;
!   struct target_ops *target = args->target;
!   if (sect->flags & SEC_CODE)
!     {
!       update_coreops = core_ops.to_sections == target->to_sections;
! 
!       if (target->to_sections)
! 	{
! 	  old = target->to_sections_end - target->to_sections;
! 	  target->to_sections = (struct section_table *)
! 	    xrealloc ((char *) target->to_sections,
! 		      (sizeof (struct section_table)) * (1 + old));
! 	}
!       else
! 	{
! 	  old = 0;
! 	  target->to_sections = (struct section_table *)
! 	    xmalloc ((sizeof (struct section_table)));
! 	}
!       target->to_sections_end = target->to_sections + (1 + old);
! 
!       /* Update the to_sections field in the core_ops structure
! 	 if needed.  */
!       if (update_coreops)
! 	{
! 	  core_ops.to_sections = target->to_sections;
! 	  core_ops.to_sections_end = target->to_sections_end;
! 	}
!       new_target_sect_ptr = target->to_sections + old;
!       new_target_sect_ptr->addr = args->addr + bfd_section_vma (abfd, sect);
!       new_target_sect_ptr->endaddr = args->addr + bfd_section_vma (abfd, sect) +
! 	bfd_section_size (abfd, sect);;
!       new_target_sect_ptr->the_bfd_section = sect;
!       new_target_sect_ptr->bfd = abfd;
!     }
! }
  
! static int
! dll_code_sections_add (const char *dll_name, int base_addr, struct target_ops *target)
  {
    bfd *dll_bfd;
    map_code_section_args map_args;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] indent fix, win32-nat.c
  2004-07-01 21:36 [PATCH] indent fix, win32-nat.c Michael Snyder
@ 2004-07-01 23:05 ` Christopher Faylor
  0 siblings, 0 replies; 2+ messages in thread
From: Christopher Faylor @ 2004-07-01 23:05 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches, Corinna Vinschen

On Thu, Jul 01, 2004 at 09:36:16PM +0000, Michael Snyder wrote:
>Chris, hope you don't mind, this seemed pretty obvious.
>Indentation seems to have gotten whacked out of line here.
>

>2004-07-01  Michael Snyder  <msnyder@redhat.com>
>
>	* win32-nat.c (core_dll_symbols_add): Re-indent a small section
>	that seems to have gotten whacked out of line.

Thanks for catching this.  Wonder how that happened.

cgf


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-01 23:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-01 21:36 [PATCH] indent fix, win32-nat.c Michael Snyder
2004-07-01 23:05 ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox