From ba34b1aa2a97bd4c2610647e12f7b82fcb774004 Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Wed, 1 Aug 2012 09:05:51 +0000 Subject: [PATCH] Tentando identificar segfault em win64 --- src/lib3270/screen.c | 10 +++++++++- src/pw3270/v3270/widget.c | 11 ++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/lib3270/screen.c b/src/lib3270/screen.c index 19bf4a1..c044125 100644 --- a/src/lib3270/screen.c +++ b/src/lib3270/screen.c @@ -105,7 +105,6 @@ static void addch(H3270 *session, int baddr, unsigned char c, unsigned short att session->text[baddr].attr = attr; session->update(session,baddr,c,attr,baddr == session->cursor_addr); - } LIB3270_EXPORT int lib3270_get_element(H3270 *h, int baddr, unsigned char *c, unsigned short *attr) @@ -303,7 +302,9 @@ void screen_update(H3270 *session, int bstart, int bend) a = color_from_fa(fa); fa_addr = find_field_attribute(session,bstart); // may be -1, that's okay +#ifdef WIN32 trace("%s start=%d end=%d",__FUNCTION__,bstart,bend); +#endif // WIN32 for(baddr = bstart; baddr < bend; baddr++) { @@ -350,6 +351,10 @@ void screen_update(H3270 *session, int bstart, int bend) } } +#ifdef WIN32 + trace("%s first=%d last=%d",__FUNCTION__,first,last); +#endif // WIN32 + if(first >= 0) { int len = (last - first)+1; @@ -361,6 +366,9 @@ void screen_update(H3270 *session, int bstart, int bend) len++; } +#ifdef WIN32 + trace("%s first=%d last=%d len=%d changed=%p",__FUNCTION__,first,last,len,session->changed); +#endif // WIN32 session->changed(session,first,len); } diff --git a/src/pw3270/v3270/widget.c b/src/pw3270/v3270/widget.c index 427c3a5..9ec966d 100644 --- a/src/pw3270/v3270/widget.c +++ b/src/pw3270/v3270/widget.c @@ -698,7 +698,9 @@ static void changed(H3270 *session, int offset, int len) GtkWidget * widget = session->widget; GtkAccessible * obj = GTK_V3270(widget)->accessible; -// trace("%s: offset=%d len=%d",__FUNCTION__,offset,len) +#ifdef WIN32 + trace("%s: offset=%d len=%d accessible=%p",__FUNCTION__,offset,len,obj); +#endif if(obj) { @@ -739,8 +741,15 @@ static void changed(H3270 *session, int offset, int len) gtk_widget_queue_draw(widget); #endif // WIN32 +#ifdef WIN32 + trace("%s: emit signal",__FUNCTION__); +#endif + g_signal_emit(GTK_WIDGET(widget),v3270_widget_signal[SIGNAL_CHANGED], 0, (guint) offset, (guint) len); +#ifdef WIN32 + trace("%s: ends",__FUNCTION__); +#endif } static void set_selection(H3270 *session, unsigned char status) -- libgit2 0.21.2