* [RFA] TUI do not display current execution point
@ 2007-12-19 13:41 Denis PILAT
2007-12-19 13:52 ` Denis PILAT
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Denis PILAT @ 2007-12-19 13:41 UTC (permalink / raw)
To: gdb-patches
For binary files that have been compiled using a long absolute path, the old constant
MAX_LOCATOR_ELEMENT_LEN is not long enough.
tui_source_is_displayed() called from "tui-stack.c/tui_show_frame_info()"
always returns false and we never execute "tui_set_is_exec_point_at ()" function.
The side effect is that the ">" character is never displayed in the left pane of the TUI window.
The problem was not easy to find, but the bellow patch is very simple and fix it.
OK for commit ?
--
Denis
--- ../../../../../vendor/GDB6.7.1/gdb/tui/tui-data.h 2007-12-12 18:05:18.000000000 +0100
+++ ./tui-data.h 2007-12-19 14:03:59.000000000 +0100
@@ -196,7 +196,7 @@ struct tui_command_element
};
-#define MAX_LOCATOR_ELEMENT_LEN 100
+#define MAX_LOCATOR_ELEMENT_LEN PATH_MAX
/* Elements in the locator window content. */
struct tui_locator_element
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] TUI do not display current execution point
2007-12-19 13:41 [RFA] TUI do not display current execution point Denis PILAT
@ 2007-12-19 13:52 ` Denis PILAT
2007-12-19 14:01 ` Pierre Muller
2007-12-19 16:07 ` Andreas Schwab
2 siblings, 0 replies; 9+ messages in thread
From: Denis PILAT @ 2007-12-19 13:52 UTC (permalink / raw)
To: gdb-patches
I forgot the ChangeLog entry, here it is with a better format for the patch:
--
Denis
2007-12-19 Denis Pilat <denis.pilat@st.com>
* tui/tui-data.h: MAX_LOCATOR_ELEMENT_LEN defined to PATH_MAX.
Index: tui-data.h
===================================================================
--- tui-data.h (revision 615)
+++ tui-data.h (working copy)
@@ -196,7 +196,7 @@ struct tui_command_element
};
-#define MAX_LOCATOR_ELEMENT_LEN 100
+#define MAX_LOCATOR_ELEMENT_LEN PATH_MAX
/* Elements in the locator window content. */
struct tui_locator_element
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [RFA] TUI do not display current execution point
2007-12-19 13:41 [RFA] TUI do not display current execution point Denis PILAT
2007-12-19 13:52 ` Denis PILAT
@ 2007-12-19 14:01 ` Pierre Muller
2007-12-19 15:20 ` Daniel Jacobowitz
2007-12-19 16:07 ` Andreas Schwab
2 siblings, 1 reply; 9+ messages in thread
From: Pierre Muller @ 2007-12-19 14:01 UTC (permalink / raw)
To: 'Denis PILAT'; +Cc: gdb-patches
Code in gdb directory (utils.c and top.c)
using PATH_MAX first check if that macro is defined.
Shouldn't you do the same in that patch?
Pierre Muller
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Denis PILAT
> Sent: Wednesday, December 19, 2007 2:30 PM
> To: gdb-patches
> Subject: [RFA] TUI do not display current execution point
>
> For binary files that have been compiled using a long absolute path,
> the old constant
> MAX_LOCATOR_ELEMENT_LEN is not long enough.
>
> tui_source_is_displayed() called from "tui-
> stack.c/tui_show_frame_info()"
> always returns false and we never execute "tui_set_is_exec_point_at ()"
> function.
>
> The side effect is that the ">" character is never displayed in the
> left pane of the TUI window.
>
> The problem was not easy to find, but the bellow patch is very simple
> and fix it.
>
> OK for commit ?
>
> --
>
> Denis
>
> --- ../../../../../vendor/GDB6.7.1/gdb/tui/tui-data.h 2007-12-12
> 18:05:18.000000000 +0100
> +++ ./tui-data.h 2007-12-19 14:03:59.000000000 +0100
> @@ -196,7 +196,7 @@ struct tui_command_element
> };
>
>
> -#define MAX_LOCATOR_ELEMENT_LEN 100
> +#define MAX_LOCATOR_ELEMENT_LEN PATH_MAX
>
> /* Elements in the locator window content. */
> struct tui_locator_element
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] TUI do not display current execution point
2007-12-19 14:01 ` Pierre Muller
@ 2007-12-19 15:20 ` Daniel Jacobowitz
2007-12-19 15:28 ` Denis PILAT
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2007-12-19 15:20 UTC (permalink / raw)
To: Pierre Muller; +Cc: 'Denis PILAT', gdb-patches
On Wed, Dec 19, 2007 at 02:56:18PM +0100, Pierre Muller wrote:
> Code in gdb directory (utils.c and top.c)
> using PATH_MAX first check if that macro is defined.
>
> Shouldn't you do the same in that patch?
Yes. Also, please correct the ChangeLog entry; you're changing
MAX_LOCATOR_ELEMENT_LEN so that goes in parentheses.
Changing it to a bigger hardcoded constant is OK in this case,
although the right fix would be to remove the hardcoded length
(that's in the GNU Coding Standards, I think).
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] TUI do not display current execution point
2007-12-19 15:20 ` Daniel Jacobowitz
@ 2007-12-19 15:28 ` Denis PILAT
2007-12-19 15:40 ` Daniel Jacobowitz
2007-12-21 7:38 ` Denis PILAT
0 siblings, 2 replies; 9+ messages in thread
From: Denis PILAT @ 2007-12-19 15:28 UTC (permalink / raw)
To: Pierre Muller, gdb-patches; +Cc: 'Denis PILAT'
You're both right, here is the new proposal:
--
Denis
2007-12-19 Denis Pilat <denis.pilat@st.com>
* tui/tui-data.h (MAX_LOCATOR_ELEMENT_LEN): Defined to a bigger
value or to PATH_MAX when possible.
Index: tui-data.h
===================================================================
--- tui-data.h (revision 615)
+++ tui-data.h (working copy)
@@ -195,8 +195,11 @@ struct tui_command_element
char *line;
};
-
-#define MAX_LOCATOR_ELEMENT_LEN 100
+#ifdef PATH_MAX
+# define MAX_LOCATOR_ELEMENT_LEN PATH_MAX
+#else
+# define MAX_LOCATOR_ELEMENT_LEN 1024
+#endif
/* Elements in the locator window content. */
struct tui_locator_element
Daniel Jacobowitz wrote:
> On Wed, Dec 19, 2007 at 02:56:18PM +0100, Pierre Muller wrote:
>
>> Code in gdb directory (utils.c and top.c)
>> using PATH_MAX first check if that macro is defined.
>>
>> Shouldn't you do the same in that patch?
>>
>
> Yes. Also, please correct the ChangeLog entry; you're changing
> MAX_LOCATOR_ELEMENT_LEN so that goes in parentheses.
>
> Changing it to a bigger hardcoded constant is OK in this case,
> although the right fix would be to remove the hardcoded length
> (that's in the GNU Coding Standards, I think).
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] TUI do not display current execution point
2007-12-19 15:28 ` Denis PILAT
@ 2007-12-19 15:40 ` Daniel Jacobowitz
2007-12-21 7:38 ` Denis PILAT
1 sibling, 0 replies; 9+ messages in thread
From: Daniel Jacobowitz @ 2007-12-19 15:40 UTC (permalink / raw)
To: Denis PILAT; +Cc: Pierre Muller, gdb-patches
On Wed, Dec 19, 2007 at 04:27:21PM +0100, Denis PILAT wrote:
> You're both right, here is the new proposal:
>
>
> --
> Denis
>
> 2007-12-19 Denis Pilat <denis.pilat@st.com>
>
> * tui/tui-data.h (MAX_LOCATOR_ELEMENT_LEN): Defined to a bigger
> value or to PATH_MAX when possible.
OK.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] TUI do not display current execution point
2007-12-19 13:41 [RFA] TUI do not display current execution point Denis PILAT
2007-12-19 13:52 ` Denis PILAT
2007-12-19 14:01 ` Pierre Muller
@ 2007-12-19 16:07 ` Andreas Schwab
2 siblings, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 2007-12-19 16:07 UTC (permalink / raw)
To: Denis PILAT; +Cc: gdb-patches
Denis PILAT <denis.pilat@st.com> writes:
> --- ../../../../../vendor/GDB6.7.1/gdb/tui/tui-data.h 2007-12-12 18:05:18.000000000 +0100
> +++ ./tui-data.h 2007-12-19 14:03:59.000000000 +0100
> @@ -196,7 +196,7 @@ struct tui_command_element
> };
>
>
> -#define MAX_LOCATOR_ELEMENT_LEN 100
> +#define MAX_LOCATOR_ELEMENT_LEN PATH_MAX
PATH_MAX may not be defined if there is no fixed limit.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] TUI do not display current execution point
2007-12-19 15:28 ` Denis PILAT
2007-12-19 15:40 ` Daniel Jacobowitz
@ 2007-12-21 7:38 ` Denis PILAT
2007-12-21 10:48 ` Joel Brobecker
1 sibling, 1 reply; 9+ messages in thread
From: Denis PILAT @ 2007-12-21 7:38 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
Hi Daniel,
I have a problem accessing remote cvs from my work,
Could you please commit it for me ?
(Accepted patch is here:
http://sources.redhat.com/ml/gdb-patches/2007-12/msg00315.html)
Thanks
Denis
Denis PILAT wrote:
> You're both right, here is the new proposal:
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] TUI do not display current execution point
2007-12-21 7:38 ` Denis PILAT
@ 2007-12-21 10:48 ` Joel Brobecker
0 siblings, 0 replies; 9+ messages in thread
From: Joel Brobecker @ 2007-12-21 10:48 UTC (permalink / raw)
To: Denis PILAT; +Cc: Daniel Jacobowitz, gdb-patches
> I have a problem accessing remote cvs from my work,
>
> Could you please commit it for me ?
> (Accepted patch is here:
> http://sources.redhat.com/ml/gdb-patches/2007-12/msg00315.html)
I'm not Daniel, but I was working on GDB anyways, so I did the commit
for you :).
--
Joel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-12-21 7:38 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-19 13:41 [RFA] TUI do not display current execution point Denis PILAT
2007-12-19 13:52 ` Denis PILAT
2007-12-19 14:01 ` Pierre Muller
2007-12-19 15:20 ` Daniel Jacobowitz
2007-12-19 15:28 ` Denis PILAT
2007-12-19 15:40 ` Daniel Jacobowitz
2007-12-21 7:38 ` Denis PILAT
2007-12-21 10:48 ` Joel Brobecker
2007-12-19 16:07 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox