Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: PR tui/14486: resize crashes tui
@ 2012-08-17 20:33 H.J. Lu
  2012-08-20 10:36 ` Abid, Hafiz
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2012-08-17 20:33 UTC (permalink / raw)
  To: GDB

This patch checks if TUI_SRC_WIN is not NULL before referencing it.  OK
to install?

Thanks.


H.J.
----
2010-08-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR tui/14486
	* tui/tui-source.c (tui_source_is_displayed): Check if TUI_SRC_WIN
	is not NULL before referencing it.

diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index 9ba9b1d..030653c 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -334,7 +334,8 @@ tui_show_symtab_source (struct gdbarch *gdbarch, struct symtab *s,
 int
 tui_source_is_displayed (char *fname)
 {
-  return (TUI_SRC_WIN->generic.content_in_use 
+  return (TUI_SRC_WIN != NULL
+	  && TUI_SRC_WIN->generic.content_in_use 
 	  && (filename_cmp (((struct tui_win_element *)
 			     (tui_locator_win_info_ptr ())->
 			     content[0])->which_element.locator.file_name,


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: PATCH: PR tui/14486: resize crashes tui
  2012-08-17 20:33 PATCH: PR tui/14486: resize crashes tui H.J. Lu
@ 2012-08-20 10:36 ` Abid, Hafiz
  2012-08-20 13:30   ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Abid, Hafiz @ 2012-08-20 10:36 UTC (permalink / raw)
  To: H.J. Lu, GDB

You may want to look at the following thread. It seems to be fixing a related problem.

http://sourceware.org/ml/gdb-patches/2012-08/msg00349.html


Regards,
Abid

> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of H.J. Lu
> Sent: Friday, August 17, 2012 9:33 PM
> To: GDB
> Subject: PATCH: PR tui/14486: resize crashes tui
> 
> This patch checks if TUI_SRC_WIN is not NULL before referencing it.  OK
> to install?
> 
> Thanks.
> 
> 
> H.J.
> ----
> 2010-08-17  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	PR tui/14486
> 	* tui/tui-source.c (tui_source_is_displayed): Check if
> TUI_SRC_WIN
> 	is not NULL before referencing it.
> 
> diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
> index 9ba9b1d..030653c 100644
> --- a/gdb/tui/tui-source.c
> +++ b/gdb/tui/tui-source.c
> @@ -334,7 +334,8 @@ tui_show_symtab_source (struct gdbarch *gdbarch,
> struct symtab *s,
>  int
>  tui_source_is_displayed (char *fname)
>  {
> -  return (TUI_SRC_WIN->generic.content_in_use
> +  return (TUI_SRC_WIN != NULL
> +	  && TUI_SRC_WIN->generic.content_in_use
>  	  && (filename_cmp (((struct tui_win_element *)
>  			     (tui_locator_win_info_ptr ())->
>  			     content[0])->which_element.locator.file_name,


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: PR tui/14486: resize crashes tui
  2012-08-20 10:36 ` Abid, Hafiz
@ 2012-08-20 13:30   ` H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 2012-08-20 13:30 UTC (permalink / raw)
  To: Abid, Hafiz; +Cc: GDB

On Mon, Aug 20, 2012 at 3:36 AM, Abid, Hafiz <Hafiz_Abid@mentor.com> wrote:
> You may want to look at the following thread. It seems to be fixing a related problem.
>
> http://sourceware.org/ml/gdb-patches/2012-08/msg00349.html
>

I think it is the same problem.

> Regards,
> Abid
>
>> -----Original Message-----
>> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
>> owner@sourceware.org] On Behalf Of H.J. Lu
>> Sent: Friday, August 17, 2012 9:33 PM
>> To: GDB
>> Subject: PATCH: PR tui/14486: resize crashes tui
>>
>> This patch checks if TUI_SRC_WIN is not NULL before referencing it.  OK
>> to install?
>>
>> Thanks.
>>
>>
>> H.J.
>> ----
>> 2010-08-17  H.J. Lu  <hongjiu.lu@intel.com>
>>
>>       PR tui/14486
>>       * tui/tui-source.c (tui_source_is_displayed): Check if
>> TUI_SRC_WIN
>>       is not NULL before referencing it.
>>
>> diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
>> index 9ba9b1d..030653c 100644
>> --- a/gdb/tui/tui-source.c
>> +++ b/gdb/tui/tui-source.c
>> @@ -334,7 +334,8 @@ tui_show_symtab_source (struct gdbarch *gdbarch,
>> struct symtab *s,
>>  int
>>  tui_source_is_displayed (char *fname)
>>  {
>> -  return (TUI_SRC_WIN->generic.content_in_use
>> +  return (TUI_SRC_WIN != NULL
>> +       && TUI_SRC_WIN->generic.content_in_use
>>         && (filename_cmp (((struct tui_win_element *)
>>                            (tui_locator_win_info_ptr ())->
>>                            content[0])->which_element.locator.file_name,



-- 
H.J.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-20 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-17 20:33 PATCH: PR tui/14486: resize crashes tui H.J. Lu
2012-08-20 10:36 ` Abid, Hafiz
2012-08-20 13:30   ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox