Commit ba34b1aa2a97bd4c2610647e12f7b82fcb774004
1 parent
bd6ae6e6
Exists in
master
and in
5 other branches
Tentando identificar segfault em win64
Showing
2 changed files
with
19 additions
and
2 deletions
Show diff stats
src/lib3270/screen.c
@@ -105,7 +105,6 @@ static void addch(H3270 *session, int baddr, unsigned char c, unsigned short att | @@ -105,7 +105,6 @@ static void addch(H3270 *session, int baddr, unsigned char c, unsigned short att | ||
105 | session->text[baddr].attr = attr; | 105 | session->text[baddr].attr = attr; |
106 | 106 | ||
107 | session->update(session,baddr,c,attr,baddr == session->cursor_addr); | 107 | session->update(session,baddr,c,attr,baddr == session->cursor_addr); |
108 | - | ||
109 | } | 108 | } |
110 | 109 | ||
111 | LIB3270_EXPORT int lib3270_get_element(H3270 *h, int baddr, unsigned char *c, unsigned short *attr) | 110 | 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) | @@ -303,7 +302,9 @@ void screen_update(H3270 *session, int bstart, int bend) | ||
303 | a = color_from_fa(fa); | 302 | a = color_from_fa(fa); |
304 | fa_addr = find_field_attribute(session,bstart); // may be -1, that's okay | 303 | fa_addr = find_field_attribute(session,bstart); // may be -1, that's okay |
305 | 304 | ||
305 | +#ifdef WIN32 | ||
306 | trace("%s start=%d end=%d",__FUNCTION__,bstart,bend); | 306 | trace("%s start=%d end=%d",__FUNCTION__,bstart,bend); |
307 | +#endif // WIN32 | ||
307 | 308 | ||
308 | for(baddr = bstart; baddr < bend; baddr++) | 309 | for(baddr = bstart; baddr < bend; baddr++) |
309 | { | 310 | { |
@@ -350,6 +351,10 @@ void screen_update(H3270 *session, int bstart, int bend) | @@ -350,6 +351,10 @@ void screen_update(H3270 *session, int bstart, int bend) | ||
350 | } | 351 | } |
351 | } | 352 | } |
352 | 353 | ||
354 | +#ifdef WIN32 | ||
355 | + trace("%s first=%d last=%d",__FUNCTION__,first,last); | ||
356 | +#endif // WIN32 | ||
357 | + | ||
353 | if(first >= 0) | 358 | if(first >= 0) |
354 | { | 359 | { |
355 | int len = (last - first)+1; | 360 | int len = (last - first)+1; |
@@ -361,6 +366,9 @@ void screen_update(H3270 *session, int bstart, int bend) | @@ -361,6 +366,9 @@ void screen_update(H3270 *session, int bstart, int bend) | ||
361 | len++; | 366 | len++; |
362 | } | 367 | } |
363 | 368 | ||
369 | +#ifdef WIN32 | ||
370 | + trace("%s first=%d last=%d len=%d changed=%p",__FUNCTION__,first,last,len,session->changed); | ||
371 | +#endif // WIN32 | ||
364 | session->changed(session,first,len); | 372 | session->changed(session,first,len); |
365 | } | 373 | } |
366 | 374 |
src/pw3270/v3270/widget.c
@@ -698,7 +698,9 @@ static void changed(H3270 *session, int offset, int len) | @@ -698,7 +698,9 @@ static void changed(H3270 *session, int offset, int len) | ||
698 | GtkWidget * widget = session->widget; | 698 | GtkWidget * widget = session->widget; |
699 | GtkAccessible * obj = GTK_V3270(widget)->accessible; | 699 | GtkAccessible * obj = GTK_V3270(widget)->accessible; |
700 | 700 | ||
701 | -// trace("%s: offset=%d len=%d",__FUNCTION__,offset,len) | 701 | +#ifdef WIN32 |
702 | + trace("%s: offset=%d len=%d accessible=%p",__FUNCTION__,offset,len,obj); | ||
703 | +#endif | ||
702 | 704 | ||
703 | if(obj) | 705 | if(obj) |
704 | { | 706 | { |
@@ -739,8 +741,15 @@ static void changed(H3270 *session, int offset, int len) | @@ -739,8 +741,15 @@ static void changed(H3270 *session, int offset, int len) | ||
739 | gtk_widget_queue_draw(widget); | 741 | gtk_widget_queue_draw(widget); |
740 | #endif // WIN32 | 742 | #endif // WIN32 |
741 | 743 | ||
744 | +#ifdef WIN32 | ||
745 | + trace("%s: emit signal",__FUNCTION__); | ||
746 | +#endif | ||
747 | + | ||
742 | g_signal_emit(GTK_WIDGET(widget),v3270_widget_signal[SIGNAL_CHANGED], 0, (guint) offset, (guint) len); | 748 | g_signal_emit(GTK_WIDGET(widget),v3270_widget_signal[SIGNAL_CHANGED], 0, (guint) offset, (guint) len); |
743 | 749 | ||
750 | +#ifdef WIN32 | ||
751 | + trace("%s: ends",__FUNCTION__); | ||
752 | +#endif | ||
744 | } | 753 | } |
745 | 754 | ||
746 | static void set_selection(H3270 *session, unsigned char status) | 755 | static void set_selection(H3270 *session, unsigned char status) |