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 03/10] C language


On Sat, Jun 2, 2012 at 12:32 PM, Sergio Durigan Junior
<sergiodj@redhat.com> wrote:
> @@ -2651,11 +2665,16 @@ yylex (void)
> ?}
>
> ?int
> -c_parse (void)
> +c_parse (struct parser_state *par_state)
> ?{
> ? int result;
> - ?struct cleanup *back_to = make_cleanup (free_current_contents,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? &expression_macro_scope);
> + ?struct cleanup *back_to;
> +
> + ?/* Setting up the parser state. ?*/
> + ?gdb_assert (par_state != NULL);
> + ?pstate = par_state;
> +
> + ?back_to = make_cleanup (free_current_contents, &expression_macro_scope);
>
> ? /* Set up the scope for macro expansion. ?*/
> ? expression_macro_scope = NULL;

IWBN to reset pstate back to NULL when done.


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