This is the mail archive of the gdb-patches@sources.redhat.com 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: Fork event updates, part the second


On Wed, Nov 13, 2002 at 05:55:31PM -0500, Daniel Jacobowitz wrote:
> The next patch in the series.  This one has no substantive changes except to
> push HP/UX specific code from infrun.c and inftarg.c back into hppah-nat.c.
> 
> There were formerly four methods: target_has_forked, target_has_vforked,
> target_has_execd, target_has_syscall_event.  They were used in two places:
>   - breakpoint.c to figure out if a catchpoint triggered
>   - inftarg.c's default child_wait to see whether to return a
>     TARGET_WAITKIND_*.
> 
> That's the wrong way to go; we shouldn't go grubbing around in the target
> twice for this information.  And we don't need to call a target-specific
> hook in bpstat_stop_status to figure out why we stopped; the information is
> already available in the waitstatus.
> 
> So what I did in this patch was remove those four hooks; make their
> implementations private to the HP/UX code; give HP/UX a custom child_wait
> function which calls them; and provide functions to check for fork events
> etc. in the saved waitstatus.  Then I cleared the HP/UXisms out of
> inftarg.c:child_wait.
> 
> The inspiration was that the hooks didn't have enough information in their
> current form to do their job on Linux; when I went to look at fixing them I
> decided this was cleaner.  So far my total is at five target hooks removed;
> I've got one to add and at least two more to remove, also.  In the end I
> just have target_follow_fork().
> 
> This patch is entirely mechanical, and tested on i386-linux and HP/UX.  I'll
> commit this on Friday also, unless there are comments/concerns.

Committed.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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