This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [python][patch] Inferior and Thread information support.
- From: Tom Tromey <tromey at redhat dot com>
- To: Phil Muldoon <pmuldoon at redhat dot com>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Fri, 18 Jun 2010 12:04:39 -0600
- Subject: Re: [python][patch] Inferior and Thread information support.
- References: <4BFA6E82.3070704@redhat.com> <m3aar2afyu.fsf@fleche.redhat.com> <4C1B16BF.3040000@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
Phil> +int
Phil> +search_memory (CORE_ADDR *start_addr, ULONGEST *search_space_len,
Phil> + const char *pattern_buf, ULONGEST pattern_len,
Phil> + CORE_ADDR *found_addr)
I think if you remove the max_count parameter then you won't need this
at all, you can just call target_search_memory directly.
Phil> +struct inflist_entry {
Phil> + inferior_object *inf_obj;
Phil> + struct inflist_entry *next;
Phil> +};
[...]
Phil> +/* List containing inferior_objects. This list owns a reference to each
Phil> + object it contains. */
Phil> +static struct inflist_entry *gdbpy_inferior_list;
Phil> +
Phil> +static int ninferiors;
I'm sorry I missed this earlier...
struct inferior now has a "user-data" API, like objfiles do.
See register_inferior_data and register_inferior_data_with_cleanup.
I think this means that we can attach the Python objects directly to the
struct inferior, rather than keeping an external list.
This change should simplify a lot of code.
Tom