This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch Darwin] head build fixes for i686-darwin9/x86_64-darwin10.


> how about this instead.  it localizes the #ifdef and has a comment.

Tristan being on holiday, I will take over this week. This looks
OK to me with one tiny request: Update the function documentation
about also returning -1 to signify that the request is unsupported.
I assume you'll remember to provide a CL.

I wonder how we are expected to iterate over shared libraries
on Darwin 9 (we no longer have access to this version of Darwin).

Thanks!

> diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
> index 252fe3e..ac0aaac 100644
> --- a/gdb/darwin-nat.c
> +++ b/gdb/darwin-nat.c
> @@ -1821,6 +1821,10 @@ out:
>  static int
>  darwin_read_dyld_info (task_t task, CORE_ADDR addr, char *rdaddr, int length)
>  {
> +#ifndef TASK_DYLD_INFO_COUNT
> +  /* This is not available in Darwin 9.  */
> +  return -1;
> +#else
>    struct task_dyld_info task_dyld_info;
>    mach_msg_type_number_t count = TASK_DYLD_INFO_COUNT;
>    int sz = TASK_DYLD_INFO_COUNT * sizeof (natural_t);
> @@ -1838,6 +1842,7 @@ darwin_read_dyld_info (task_t task, CORE_ADDR addr, char 
> *rdaddr, int length)
>      length = sz - addr;
>    memcpy (rdaddr, (char *)&task_dyld_info + addr, length);
>    return length;
> +#endif
>  }
>  
>  
> -mike



-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]