* [patch] Darwin build fix for unused prototypes
@ 2012-03-08 18:37 Josh Matthews
2012-03-09 8:41 ` Tristan Gingold
2012-03-09 13:40 ` Joel Brobecker
0 siblings, 2 replies; 7+ messages in thread
From: Josh Matthews @ 2012-03-08 18:37 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 568 bytes --]
2012-03-08 Josh Matthews <josh@joshmatthews.net>
* darwin-nat-info.c: Add missing prototype for
_initialize_darwin_info_commands. Make darwin_debug_port_info static.
* darwin-nat.c: Add missing prototype for _initialize_darwin_infereior.
* i386-darwin-nat.c: Remove unused functions
i386_darwin_dr_set, i386_darwin_dr_get, i386_darwin_set_control,
i386_darwin_get_control, i386_darwin_dr_set_addr,
i386_darwin_get_addr, i386_darwin_get_status, i386_darwin_get_control.
* machoread.c: Add missing prototype for _initialize_machoread.
[-- Attachment #2: darwin_prototypes.diff --]
[-- Type: application/octet-stream, Size: 5230 bytes --]
diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c
index 9170e14..9741538 100644
--- a/gdb/darwin-nat-info.c
+++ b/gdb/darwin-nat-info.c
@@ -301,7 +301,7 @@ info_mach_ports_command (char *args, int from_tty)
}
-void
+static void
darwin_debug_port_info (task_t task, mach_port_t port)
{
kern_return_t kret;
@@ -843,6 +843,9 @@ info_mach_exceptions_command (char *args, int from_tty)
}
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_darwin_info_commands;
+
void
_initialize_darwin_info_commands (void)
{
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index 0feebe3..de661a3 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -2015,6 +2015,9 @@ darwin_supports_multi_process (void)
return 1;
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_darwin_inferior;
+
void
_initialize_darwin_inferior (void)
{
diff --git a/gdb/i386-darwin-nat.c b/gdb/i386-darwin-nat.c
index b452f1e..b127da9 100644
--- a/gdb/i386-darwin-nat.c
+++ b/gdb/i386-darwin-nat.c
@@ -260,157 +260,6 @@ i386_darwin_store_inferior_registers (struct target_ops *ops,
}
}
-
-/* Support for debug registers, boosted mostly from i386-linux-nat.c. */
-
-static void
-i386_darwin_dr_set (int regnum, uint32_t value)
-{
- int current_pid;
- thread_t current_thread;
- x86_debug_state_t dr_regs;
- kern_return_t ret;
- unsigned int dr_count = x86_DEBUG_STATE_COUNT;
-
- gdb_assert (regnum >= 0 && regnum <= DR_CONTROL);
-
- current_thread = ptid_get_tid (inferior_ptid);
-
- dr_regs.dsh.flavor = x86_DEBUG_STATE32;
- dr_regs.dsh.count = x86_DEBUG_STATE32_COUNT;
- dr_count = x86_DEBUG_STATE_COUNT;
- ret = thread_get_state (current_thread, x86_DEBUG_STATE,
- (thread_state_t) &dr_regs, &dr_count);
-
- if (ret != KERN_SUCCESS)
- {
- printf_unfiltered (_("Error reading debug registers "
- "thread 0x%x via thread_get_state\n"),
- (int) current_thread);
- MACH_CHECK_ERROR (ret);
- }
-
- switch (regnum)
- {
- case 0:
- dr_regs.uds.ds32.__dr0 = value;
- break;
- case 1:
- dr_regs.uds.ds32.__dr1 = value;
- break;
- case 2:
- dr_regs.uds.ds32.__dr2 = value;
- break;
- case 3:
- dr_regs.uds.ds32.__dr3 = value;
- break;
- case 4:
- dr_regs.uds.ds32.__dr4 = value;
- break;
- case 5:
- dr_regs.uds.ds32.__dr5 = value;
- break;
- case 6:
- dr_regs.uds.ds32.__dr6 = value;
- break;
- case 7:
- dr_regs.uds.ds32.__dr7 = value;
- break;
- }
-
- ret = thread_set_state (current_thread, x86_DEBUG_STATE,
- (thread_state_t) &dr_regs, dr_count);
-
- if (ret != KERN_SUCCESS)
- {
- printf_unfiltered (_("Error writing debug registers "
- "thread 0x%x via thread_get_state\n"),
- (int) current_thread);
- MACH_CHECK_ERROR (ret);
- }
-}
-
-static uint32_t
-i386_darwin_dr_get (int regnum)
-{
- thread_t current_thread;
- x86_debug_state_t dr_regs;
- kern_return_t ret;
- unsigned int dr_count = x86_DEBUG_STATE_COUNT;
-
- gdb_assert (regnum >= 0 && regnum <= DR_CONTROL);
-
- current_thread = ptid_get_tid (inferior_ptid);
-
- dr_regs.dsh.flavor = x86_DEBUG_STATE32;
- dr_regs.dsh.count = x86_DEBUG_STATE32_COUNT;
- dr_count = x86_DEBUG_STATE_COUNT;
- ret = thread_get_state (current_thread, x86_DEBUG_STATE,
- (thread_state_t) &dr_regs, &dr_count);
-
- if (ret != KERN_SUCCESS)
- {
- printf_unfiltered (_("Error reading debug registers "
- "thread 0x%x via thread_get_state\n"),
- (int) current_thread);
- MACH_CHECK_ERROR (ret);
- }
-
- switch (regnum)
- {
- case 0:
- return dr_regs.uds.ds32.__dr0;
- case 1:
- return dr_regs.uds.ds32.__dr1;
- case 2:
- return dr_regs.uds.ds32.__dr2;
- case 3:
- return dr_regs.uds.ds32.__dr3;
- case 4:
- return dr_regs.uds.ds32.__dr4;
- case 5:
- return dr_regs.uds.ds32.__dr5;
- case 6:
- return dr_regs.uds.ds32.__dr6;
- case 7:
- return dr_regs.uds.ds32.__dr7;
- default:
- return -1;
- }
-}
-
-void
-i386_darwin_dr_set_control (unsigned long control)
-{
- i386_darwin_dr_set (DR_CONTROL, control);
-}
-
-void
-i386_darwin_dr_set_addr (int regnum, CORE_ADDR addr)
-{
- gdb_assert (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR);
-
- i386_darwin_dr_set (DR_FIRSTADDR + regnum, addr);
-}
-
-CORE_ADDR
-i386_darwin_dr_get_addr (int regnum)
-{
- return i386_darwin_dr_get (regnum);
-}
-
-unsigned long
-i386_darwin_dr_get_status (void)
-{
- return i386_darwin_dr_get (DR_STATUS);
-}
-
-unsigned long
-i386_darwin_dr_get_control (void)
-{
- return i386_darwin_dr_get (DR_CONTROL);
-}
-
void
darwin_check_osabi (darwin_inferior *inf, thread_t thread)
{
diff --git a/gdb/machoread.c b/gdb/machoread.c
index 88ce612..8a6b500 100644
--- a/gdb/machoread.c
+++ b/gdb/machoread.c
@@ -1035,6 +1035,9 @@ static const struct sym_fns macho_sym_fns = {
&psym_functions
};
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_machoread;
+
void
_initialize_machoread ()
{
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [patch] Darwin build fix for unused prototypes
2012-03-08 18:37 [patch] Darwin build fix for unused prototypes Josh Matthews
@ 2012-03-09 8:41 ` Tristan Gingold
2012-03-09 13:40 ` Joel Brobecker
1 sibling, 0 replies; 7+ messages in thread
From: Tristan Gingold @ 2012-03-09 8:41 UTC (permalink / raw)
To: Josh Matthews; +Cc: gdb-patches
On Mar 8, 2012, at 7:36 PM, Josh Matthews wrote:
> 2012-03-08 Josh Matthews <josh@joshmatthews.net>
>
> * darwin-nat-info.c: Add missing prototype for
> _initialize_darwin_info_commands. Make darwin_debug_port_info static.
> * darwin-nat.c: Add missing prototype for _initialize_darwin_infereior.
> * i386-darwin-nat.c: Remove unused functions
> i386_darwin_dr_set, i386_darwin_dr_get, i386_darwin_set_control,
> i386_darwin_get_control, i386_darwin_dr_set_addr,
> i386_darwin_get_addr, i386_darwin_get_status, i386_darwin_get_control.
> * machoread.c: Add missing prototype for _initialize_machoread.
> <darwin_prototypes.diff>
Hi Josh,
the 'add missing prototype' parts are OK. Please commit (if you have commit rights) or tell me if I have to do so.
I'd prefer to keep the i386-darwin-nat.c functions that deal with hardware watchpoint, although I still have to enable this.
Maybe a temporary '#ifdef HW_WATCHPOINT_NOT_YET_ENABLED' would be better in this case.
Tristan.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch] Darwin build fix for unused prototypes
2012-03-08 18:37 [patch] Darwin build fix for unused prototypes Josh Matthews
2012-03-09 8:41 ` Tristan Gingold
@ 2012-03-09 13:40 ` Joel Brobecker
2012-03-09 15:40 ` Josh Matthews
1 sibling, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2012-03-09 13:40 UTC (permalink / raw)
To: Josh Matthews; +Cc: gdb-patches, Tristan Gingold
Hi Josh,
> 2012-03-08 Josh Matthews <josh@joshmatthews.net>
>
> * darwin-nat-info.c: Add missing prototype for
> _initialize_darwin_info_commands. Make darwin_debug_port_info static.
> * darwin-nat.c: Add missing prototype for _initialize_darwin_infereior.
> * i386-darwin-nat.c: Remove unused functions
> i386_darwin_dr_set, i386_darwin_dr_get, i386_darwin_set_control,
> i386_darwin_get_control, i386_darwin_dr_set_addr,
> i386_darwin_get_addr, i386_darwin_get_status, i386_darwin_get_control.
> * machoread.c: Add missing prototype for _initialize_machoread.
Before you commit, can you make sure you re-format this ChangeLog
entry so that all the text is aligned on a tab? Also, can you use
two spaces after each period. And finally, I noticed at least one
typo:
_initialize_darwin_infereior
I suggest:
* darwin-nat-info.c (_initialize_darwin_info_commands): Add
prototype.
(darwin_debug_port_info): Make static.
* darwin-nat.c (_initialize_darwin_inferior): Add prototype.
* machoread.c (_initialize_machoread): Add prototype.
* i386-darwin-nat.c (i386_darwin_dr_set, i386_darwin_dr_get)
(i386_darwin_set_control, i386_darwin_get_control)
i386_darwin_dr_set_addr, i386_darwin_get_addr)
i386_darwin_get_status, i386_darwin_get_control):
Comment these functions out.
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [patch] Darwin build fix for unused prototypes
2012-03-09 13:40 ` Joel Brobecker
@ 2012-03-09 15:40 ` Josh Matthews
2012-03-09 16:35 ` Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Josh Matthews @ 2012-03-09 15:40 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches, Tristan Gingold
[-- Attachment #1: Type: text/plain, Size: 2166 bytes --]
Thanks for the suggestions. Please commit this, as I don't have access.
gdb/ChangeLog:
* darwin-nat-info.c (_initialize_darwin_info_commands): Add
prototype.
(darwin_debug_port_info): Make static.
* darwin-nat.c (_initialize_darwin_inferior): Add prototype.
* machoread.c (_initialize_machoread): Add prototype.
* i386-darwin-nat.c (i386_darwin_dr_set, i386_darwin_dr_get)
(i386_darwin_set_control, i386_darwin_get_control)
i386_darwin_dr_set_addr, i386_darwin_get_addr)
i386_darwin_get_status, i386_darwin_get_control):
Hide these with HW_WATCHPOINT_NOT_YET_ENABLED.
Cheers,
Josh
On 9 March 2012 08:40, Joel Brobecker <brobecker@adacore.com> wrote:
> Hi Josh,
>
>> 2012-03-08 Josh Matthews <josh@joshmatthews.net>
>>
>> * darwin-nat-info.c: Add missing prototype for
>> _initialize_darwin_info_commands. Make darwin_debug_port_info static.
>> * darwin-nat.c: Add missing prototype for _initialize_darwin_infereior.
>> * i386-darwin-nat.c: Remove unused functions
>> i386_darwin_dr_set, i386_darwin_dr_get, i386_darwin_set_control,
>> i386_darwin_get_control, i386_darwin_dr_set_addr,
>> i386_darwin_get_addr, i386_darwin_get_status, i386_darwin_get_control.
>> * machoread.c: Add missing prototype for _initialize_machoread.
>
> Before you commit, can you make sure you re-format this ChangeLog
> entry so that all the text is aligned on a tab? Also, can you use
> two spaces after each period. And finally, I noticed at least one
> typo:
>
> _initialize_darwin_infereior
>
> I suggest:
>
> * darwin-nat-info.c (_initialize_darwin_info_commands): Add
> prototype.
> (darwin_debug_port_info): Make static.
> * darwin-nat.c (_initialize_darwin_inferior): Add prototype.
> * machoread.c (_initialize_machoread): Add prototype.
> * i386-darwin-nat.c (i386_darwin_dr_set, i386_darwin_dr_get)
> (i386_darwin_set_control, i386_darwin_get_control)
> i386_darwin_dr_set_addr, i386_darwin_get_addr)
> i386_darwin_get_status, i386_darwin_get_control):
> Comment these functions out.
>
> --
> Joel
[-- Attachment #2: darwin_prototypes.diff --]
[-- Type: application/octet-stream, Size: 1772 bytes --]
diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c
index 9170e14..9741538 100644
--- a/gdb/darwin-nat-info.c
+++ b/gdb/darwin-nat-info.c
@@ -301,7 +301,7 @@ info_mach_ports_command (char *args, int from_tty)
}
-void
+static void
darwin_debug_port_info (task_t task, mach_port_t port)
{
kern_return_t kret;
@@ -843,6 +843,9 @@ info_mach_exceptions_command (char *args, int from_tty)
}
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_darwin_info_commands;
+
void
_initialize_darwin_info_commands (void)
{
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index 0feebe3..de661a3 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -2015,6 +2015,9 @@ darwin_supports_multi_process (void)
return 1;
}
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_darwin_inferior;
+
void
_initialize_darwin_inferior (void)
{
diff --git a/gdb/i386-darwin-nat.c b/gdb/i386-darwin-nat.c
index b452f1e..ced2903 100644
--- a/gdb/i386-darwin-nat.c
+++ b/gdb/i386-darwin-nat.c
@@ -260,7 +260,7 @@ i386_darwin_store_inferior_registers (struct target_ops *ops,
}
}
-
+#ifdef HW_WATCHPOINT_NOT_YET_ENABLED
/* Support for debug registers, boosted mostly from i386-linux-nat.c. */
static void
@@ -410,6 +410,7 @@ i386_darwin_dr_get_control (void)
{
return i386_darwin_dr_get (DR_CONTROL);
}
+#endif
void
darwin_check_osabi (darwin_inferior *inf, thread_t thread)
diff --git a/gdb/machoread.c b/gdb/machoread.c
index 88ce612..8a6b500 100644
--- a/gdb/machoread.c
+++ b/gdb/machoread.c
@@ -1035,6 +1035,9 @@ static const struct sym_fns macho_sym_fns = {
&psym_functions
};
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_machoread;
+
void
_initialize_machoread ()
{
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [patch] Darwin build fix for unused prototypes
2012-03-09 15:40 ` Josh Matthews
@ 2012-03-09 16:35 ` Joel Brobecker
2012-03-09 17:22 ` Josh Matthews
0 siblings, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2012-03-09 16:35 UTC (permalink / raw)
To: Josh Matthews; +Cc: gdb-patches, Tristan Gingold
Hi Josh
> Thanks for the suggestions. Please commit this, as I don't have access.
Do you have a copyright assignment on file with FSF. I searched the
records, and could not find you...
If not, we can acceptthis patch as a "tiny change" (which is also
obvious). But if you think that you might make more contributions
in the future, it would be better if you had one. Otherwise, the
total volume of your contributions would exceed our guidelins for
max contribution size without copyright assignment.
Thanks,
--
Joel
> gdb/ChangeLog:
>
> * darwin-nat-info.c (_initialize_darwin_info_commands): Add
> prototype.
> (darwin_debug_port_info): Make static.
> * darwin-nat.c (_initialize_darwin_inferior): Add prototype.
> * machoread.c (_initialize_machoread): Add prototype.
> * i386-darwin-nat.c (i386_darwin_dr_set, i386_darwin_dr_get)
> (i386_darwin_set_control, i386_darwin_get_control)
> i386_darwin_dr_set_addr, i386_darwin_get_addr)
> i386_darwin_get_status, i386_darwin_get_control):
> Hide these with HW_WATCHPOINT_NOT_YET_ENABLED.
>
> Cheers,
> Josh
>
> On 9 March 2012 08:40, Joel Brobecker <brobecker@adacore.com> wrote:
> > Hi Josh,
> >
> >> 2012-03-08  Josh Matthews  <josh@joshmatthews.net>
> >>
> >> Â Â Â Â * darwin-nat-info.c: Add missing prototype for
> >> _initialize_darwin_info_commands. Make darwin_debug_port_info static.
> >> Â Â Â Â * darwin-nat.c: Add missing prototype for _initialize_darwin_infereior.
> >> Â Â Â Â * i386-darwin-nat.c: Remove unused functions
> >> i386_darwin_dr_set, i386_darwin_dr_get, i386_darwin_set_control,
> >> i386_darwin_get_control, i386_darwin_dr_set_addr,
> >> i386_darwin_get_addr, i386_darwin_get_status, i386_darwin_get_control.
> >> Â Â Â Â * machoread.c: Add missing prototype for _initialize_machoread.
> >
> > Before you commit, can you make sure you re-format this ChangeLog
> > entry so that all the text is aligned on a tab? Also, can you use
> > two spaces after each period. And finally, I noticed at least one
> > typo:
> >
> > Â Â Â Â _initialize_darwin_infereior
> >
> > I suggest:
> >
> > Â Â Â Â * darwin-nat-info.c (_initialize_darwin_info_commands): Add
> > Â Â Â Â prototype.
> > Â Â Â Â (darwin_debug_port_info): Make static.
> > Â Â Â Â * darwin-nat.c (_initialize_darwin_inferior): Add prototype.
> > Â Â Â Â * machoread.c (_initialize_machoread): Add prototype.
> > Â Â Â Â * i386-darwin-nat.c (i386_darwin_dr_set, i386_darwin_dr_get)
> > Â Â Â Â (i386_darwin_set_control, i386_darwin_get_control)
> > Â Â Â Â i386_darwin_dr_set_addr, i386_darwin_get_addr)
> > Â Â Â Â i386_darwin_get_status, i386_darwin_get_control):
> > Â Â Â Â Comment these functions out.
> >
> > --
> > Joel
> diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c
> index 9170e14..9741538 100644
> --- a/gdb/darwin-nat-info.c
> +++ b/gdb/darwin-nat-info.c
> @@ -301,7 +301,7 @@ info_mach_ports_command (char *args, int from_tty)
> }
>
>
> -void
> +static void
> darwin_debug_port_info (task_t task, mach_port_t port)
> {
> kern_return_t kret;
> @@ -843,6 +843,9 @@ info_mach_exceptions_command (char *args, int from_tty)
> }
> }
>
> +/* -Wmissing-prototypes */
> +extern initialize_file_ftype _initialize_darwin_info_commands;
> +
> void
> _initialize_darwin_info_commands (void)
> {
> diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
> index 0feebe3..de661a3 100644
> --- a/gdb/darwin-nat.c
> +++ b/gdb/darwin-nat.c
> @@ -2015,6 +2015,9 @@ darwin_supports_multi_process (void)
> return 1;
> }
>
> +/* -Wmissing-prototypes */
> +extern initialize_file_ftype _initialize_darwin_inferior;
> +
> void
> _initialize_darwin_inferior (void)
> {
> diff --git a/gdb/i386-darwin-nat.c b/gdb/i386-darwin-nat.c
> index b452f1e..ced2903 100644
> --- a/gdb/i386-darwin-nat.c
> +++ b/gdb/i386-darwin-nat.c
> @@ -260,7 +260,7 @@ i386_darwin_store_inferior_registers (struct target_ops *ops,
> }
> }
>
> -
> +#ifdef HW_WATCHPOINT_NOT_YET_ENABLED
> /* Support for debug registers, boosted mostly from i386-linux-nat.c. */
>
> static void
> @@ -410,6 +410,7 @@ i386_darwin_dr_get_control (void)
> {
> return i386_darwin_dr_get (DR_CONTROL);
> }
> +#endif
>
> void
> darwin_check_osabi (darwin_inferior *inf, thread_t thread)
> diff --git a/gdb/machoread.c b/gdb/machoread.c
> index 88ce612..8a6b500 100644
> --- a/gdb/machoread.c
> +++ b/gdb/machoread.c
> @@ -1035,6 +1035,9 @@ static const struct sym_fns macho_sym_fns = {
> &psym_functions
> };
>
> +/* -Wmissing-prototypes */
> +extern initialize_file_ftype _initialize_machoread;
> +
> void
> _initialize_machoread ()
> {
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [patch] Darwin build fix for unused prototypes
2012-03-09 16:35 ` Joel Brobecker
@ 2012-03-09 17:22 ` Josh Matthews
2012-03-14 1:48 ` Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Josh Matthews @ 2012-03-09 17:22 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches, Tristan Gingold
I lost the copyright assignment form and haven't been able to find it,
unfortunately. Since I'm now able to print it and send it myself, I'll
do that, but I don't think it's worth holding up this change for the
form. I have aspirations of fixing the problem that prevents gdb from
being able to debug Firefox, but that's been fruitless for me so far.
Cheers,
Josh
On 9 March 2012 11:34, Joel Brobecker <brobecker@adacore.com> wrote:
> Hi Josh
>
>> Thanks for the suggestions. Please commit this, as I don't have access.
>
> Do you have a copyright assignment on file with FSF. I searched the
> records, and could not find you...
>
> If not, we can acceptthis patch as a "tiny change" (which is also
> obvious). But if you think that you might make more contributions
> in the future, it would be better if you had one. Otherwise, the
> total volume of your contributions would exceed our guidelins for
> max contribution size without copyright assignment.
>
> Thanks,
> --
> Joel
>
>> gdb/ChangeLog:
>>
>> * darwin-nat-info.c (_initialize_darwin_info_commands): Add
>> prototype.
>> (darwin_debug_port_info): Make static.
>> * darwin-nat.c (_initialize_darwin_inferior): Add prototype.
>> * machoread.c (_initialize_machoread): Add prototype.
>> * i386-darwin-nat.c (i386_darwin_dr_set, i386_darwin_dr_get)
>> (i386_darwin_set_control, i386_darwin_get_control)
>> i386_darwin_dr_set_addr, i386_darwin_get_addr)
>> i386_darwin_get_status, i386_darwin_get_control):
>> Hide these with HW_WATCHPOINT_NOT_YET_ENABLED.
>>
>> Cheers,
>> Josh
>>
>> On 9 March 2012 08:40, Joel Brobecker <brobecker@adacore.com> wrote:
>> > Hi Josh,
>> >
>> >> 2012-03-08 Josh Matthews <josh@joshmatthews.net>
>> >>
>> >> * darwin-nat-info.c: Add missing prototype for
>> >> _initialize_darwin_info_commands. Make darwin_debug_port_info static.
>> >> * darwin-nat.c: Add missing prototype for _initialize_darwin_infereior.
>> >> * i386-darwin-nat.c: Remove unused functions
>> >> i386_darwin_dr_set, i386_darwin_dr_get, i386_darwin_set_control,
>> >> i386_darwin_get_control, i386_darwin_dr_set_addr,
>> >> i386_darwin_get_addr, i386_darwin_get_status, i386_darwin_get_control.
>> >> * machoread.c: Add missing prototype for _initialize_machoread.
>> >
>> > Before you commit, can you make sure you re-format this ChangeLog
>> > entry so that all the text is aligned on a tab? Also, can you use
>> > two spaces after each period. And finally, I noticed at least one
>> > typo:
>> >
>> > _initialize_darwin_infereior
>> >
>> > I suggest:
>> >
>> > * darwin-nat-info.c (_initialize_darwin_info_commands): Add
>> > prototype.
>> > (darwin_debug_port_info): Make static.
>> > * darwin-nat.c (_initialize_darwin_inferior): Add prototype.
>> > * machoread.c (_initialize_machoread): Add prototype.
>> > * i386-darwin-nat.c (i386_darwin_dr_set, i386_darwin_dr_get)
>> > (i386_darwin_set_control, i386_darwin_get_control)
>> > i386_darwin_dr_set_addr, i386_darwin_get_addr)
>> > i386_darwin_get_status, i386_darwin_get_control):
>> > Comment these functions out.
>> >
>> > --
>> > Joel
>
>> diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c
>> index 9170e14..9741538 100644
>> --- a/gdb/darwin-nat-info.c
>> +++ b/gdb/darwin-nat-info.c
>> @@ -301,7 +301,7 @@ info_mach_ports_command (char *args, int from_tty)
>> }
>>
>>
>> -void
>> +static void
>> darwin_debug_port_info (task_t task, mach_port_t port)
>> {
>> kern_return_t kret;
>> @@ -843,6 +843,9 @@ info_mach_exceptions_command (char *args, int from_tty)
>> }
>> }
>>
>> +/* -Wmissing-prototypes */
>> +extern initialize_file_ftype _initialize_darwin_info_commands;
>> +
>> void
>> _initialize_darwin_info_commands (void)
>> {
>> diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
>> index 0feebe3..de661a3 100644
>> --- a/gdb/darwin-nat.c
>> +++ b/gdb/darwin-nat.c
>> @@ -2015,6 +2015,9 @@ darwin_supports_multi_process (void)
>> return 1;
>> }
>>
>> +/* -Wmissing-prototypes */
>> +extern initialize_file_ftype _initialize_darwin_inferior;
>> +
>> void
>> _initialize_darwin_inferior (void)
>> {
>> diff --git a/gdb/i386-darwin-nat.c b/gdb/i386-darwin-nat.c
>> index b452f1e..ced2903 100644
>> --- a/gdb/i386-darwin-nat.c
>> +++ b/gdb/i386-darwin-nat.c
>> @@ -260,7 +260,7 @@ i386_darwin_store_inferior_registers (struct target_ops *ops,
>> }
>> }
>>
>> -
>> +#ifdef HW_WATCHPOINT_NOT_YET_ENABLED
>> /* Support for debug registers, boosted mostly from i386-linux-nat.c. */
>>
>> static void
>> @@ -410,6 +410,7 @@ i386_darwin_dr_get_control (void)
>> {
>> return i386_darwin_dr_get (DR_CONTROL);
>> }
>> +#endif
>>
>> void
>> darwin_check_osabi (darwin_inferior *inf, thread_t thread)
>> diff --git a/gdb/machoread.c b/gdb/machoread.c
>> index 88ce612..8a6b500 100644
>> --- a/gdb/machoread.c
>> +++ b/gdb/machoread.c
>> @@ -1035,6 +1035,9 @@ static const struct sym_fns macho_sym_fns = {
>> &psym_functions
>> };
>>
>> +/* -Wmissing-prototypes */
>> +extern initialize_file_ftype _initialize_machoread;
>> +
>> void
>> _initialize_machoread ()
>> {
>
>
> --
> Joel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [patch] Darwin build fix for unused prototypes
2012-03-09 17:22 ` Josh Matthews
@ 2012-03-14 1:48 ` Joel Brobecker
0 siblings, 0 replies; 7+ messages in thread
From: Joel Brobecker @ 2012-03-14 1:48 UTC (permalink / raw)
To: Josh Matthews; +Cc: gdb-patches, Tristan Gingold
> I lost the copyright assignment form and haven't been able to find it,
> unfortunately. Since I'm now able to print it and send it myself, I'll
> do that, but I don't think it's worth holding up this change for the
> form. I have aspirations of fixing the problem that prevents gdb from
> being able to debug Firefox, but that's been fruitless for me so far.
You are quite right. The patch is sufficiently small and obvious to
be accepted without a formal assignment.
> >> gdb/ChangeLog:
> >>
> >> Â Â Â * darwin-nat-info.c (_initialize_darwin_info_commands): Add
> >> Â Â Â prototype.
> >> Â Â Â (darwin_debug_port_info): Make static.
> >> Â Â Â * darwin-nat.c (_initialize_darwin_inferior): Add prototype.
> >> Â Â Â * machoread.c (_initialize_machoread): Add prototype.
> >> Â Â Â * i386-darwin-nat.c (i386_darwin_dr_set, i386_darwin_dr_get)
> >> Â Â Â (i386_darwin_set_control, i386_darwin_get_control)
> >> Â Â Â i386_darwin_dr_set_addr, i386_darwin_get_addr)
> >> Â Â Â i386_darwin_get_status, i386_darwin_get_control):
> >> Â Â Â Hide these with HW_WATCHPOINT_NOT_YET_ENABLED.
Now applied. Sorry for the delay, it's been pretty busy for me
the last few days...
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-14 1:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-08 18:37 [patch] Darwin build fix for unused prototypes Josh Matthews
2012-03-09 8:41 ` Tristan Gingold
2012-03-09 13:40 ` Joel Brobecker
2012-03-09 15:40 ` Josh Matthews
2012-03-09 16:35 ` Joel Brobecker
2012-03-09 17:22 ` Josh Matthews
2012-03-14 1:48 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox