Re: [patch] Support inferior events in python

Tom Tromey
2011-01-28T16:01:10Z

>>>>> "Sami" == sami wagiaalla <swagiaal@redhat.com> writes:

Sami> Okay, I added exit_code to struct inferior, set it and used it. How
Sami> does that part of the patch look ?

It seems reasonable to me, but while looking I ran across
get_last_target_status. Can we use that instead? It isn't super to
rely on globals like this, but existing globals are grandfathered in...

Sami> + current_inferior ()->exit_code = (LONGEST) ecs->ws.value.integer;

If we keep this approach then I think you do not need this cast.

Sami> + gdbpy_breakpoint_from_bpstats (bs)) < 0)

I think it is possible for gdbpy_breakpoint_from_bpstats to return NULL.
This is not really an error condition; it just means that this
breakpoint has no corresponding Python object.

I am not sure what to do in this case, but we definitely can't do this :-)

Sami> + event = create_continue_event_object ();

Are continue events symmetric to stop events, meaning that it should
indicate which threads were continued?

This is looking quite good.

Tom