Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 329682 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/DisassemblyBackendCdi.java (-18 / +34 lines)
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
9
 *     Wind River Systems - initial API and implementation
10
 *     Freescale Semiconductor - refactoring
10
 *     Freescale Semiconductor - refactoring
11
 *     Patrick Chuong (Texas Instruments) - Bug fix (329682)
11
 *******************************************************************************/
12
 *******************************************************************************/
12
13
13
package org.eclipse.cdt.debug.internal.ui.disassembly.dsf;
14
package org.eclipse.cdt.debug.internal.ui.disassembly.dsf;
Lines 349-354 Link Here
349
	 * @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.IDisassemblyBackend#gotoSymbol(java.lang.String)
350
	 * @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.IDisassemblyBackend#gotoSymbol(java.lang.String)
350
	 */
351
	 */
351
	public void gotoSymbol(String symbol) {
352
	public void gotoSymbol(String symbol) {
353
		final BigInteger address = evaluateSymbolAddress(symbol, false);
354
		if (address != null) {
355
			fCallback.asyncExec(new Runnable() {
356
				public void run() {
357
					fCallback.gotoAddress(address);
358
				}});
359
		}
360
	}
361
362
	/*
363
	 * (non-Javadoc)
364
	 * @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#evaluateSymbolAddress(java.lang.String, boolean)
365
	 */
366
	public BigInteger evaluateSymbolAddress(String symbol, final boolean suppressError) {
352
		if (fTargetFrameContext != null) {
367
		if (fTargetFrameContext != null) {
353
			try {
368
			try {
354
				// This logic was lifted from CMemoryBlockRetrievalExtension.getExtendedMemoryBlock(String, Object)
369
				// This logic was lifted from CMemoryBlockRetrievalExtension.getExtendedMemoryBlock(String, Object)
Lines 368-378 Link Here
368
							String addressStr = cstackFrame.evaluateExpressionToString(expr);
383
							String addressStr = cstackFrame.evaluateExpressionToString(expr);
369
							if (addressStr != null) {
384
							if (addressStr != null) {
370
								try {
385
								try {
371
									final BigInteger address = (addressStr.startsWith("0x")) ? new BigInteger(addressStr.substring(2), 16) : new BigInteger(addressStr); //$NON-NLS-1$
386
									return (addressStr.startsWith("0x")) ? new BigInteger(addressStr.substring(2), 16) : new BigInteger(addressStr); //$NON-NLS-1$
372
									fCallback.asyncExec(new Runnable() {
373
										public void run() {
374
											fCallback.gotoAddress(address);
375
										}});
376
	
387
	
377
								} catch (NumberFormatException e) {
388
								} catch (NumberFormatException e) {
378
									if (i >= attempts.length) {
389
									if (i >= attempts.length) {
Lines 390-413 Link Here
390
				}
401
				}
391
			}
402
			}
392
			catch (final CDIException exc) {
403
			catch (final CDIException exc) {
393
				fCallback.asyncExec(new Runnable() {
404
				if (!suppressError) {
394
					public void run() {
405
					fCallback.asyncExec(new Runnable() {
395
		                ErrorDialog.openError(fCallback.getSite().getShell(), 
406
						public void run() {
396
		                		CDebugUIMessages.getString("DisassemblyBackendCdi_Error_Dlg_Title"),  //$NON-NLS-1$
407
			                ErrorDialog.openError(fCallback.getSite().getShell(), 
397
		                		null, new Status(IStatus.ERROR, CDebugUIPlugin.PLUGIN_ID, exc.getLocalizedMessage()));
408
			                		CDebugUIMessages.getString("DisassemblyBackendCdi_Error_Dlg_Title"),  //$NON-NLS-1$
398
					}});
409
			                		null, new Status(IStatus.ERROR, CDebugUIPlugin.PLUGIN_ID, exc.getLocalizedMessage()));
410
						}});
411
				}
399
			}
412
			}
400
			catch (final DebugException exc) {
413
			catch (final DebugException exc) {
401
				fCallback.asyncExec(new Runnable() {
414
				if (!suppressError) {
402
					public void run() {
415
					fCallback.asyncExec(new Runnable() {
403
		                ErrorDialog.openError(fCallback.getSite().getShell(), 
416
						public void run() {
404
		                		CDebugUIMessages.getString("DisassemblyBackendCdi_Error_Dlg_Title"), //$NON-NLS-1$
417
			                ErrorDialog.openError(fCallback.getSite().getShell(), 
405
		                		null, exc.getStatus());
418
			                		CDebugUIMessages.getString("DisassemblyBackendCdi_Error_Dlg_Title"), //$NON-NLS-1$
406
					}});
419
			                		null, exc.getStatus());
420
						}});
421
				}
407
			}
422
			}
408
		}
423
		}
424
		return null;
409
	}
425
	}
410
426
	
411
	/* (non-Javadoc)
427
	/* (non-Javadoc)
412
	 * @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.IDisassemblyBackend#retrieveDisassembly(java.lang.String, int, java.math.BigInteger, boolean, boolean, boolean)
428
	 * @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.IDisassemblyBackend#retrieveDisassembly(java.lang.String, int, java.math.BigInteger, boolean, boolean, boolean)
413
	 */
429
	 */
(-)src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/IDisassemblyBackend.java (+10 lines)
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
9
 *     Wind River Systems - initial API and implementation
10
 *     Freescale Semiconductor - refactoring
10
 *     Freescale Semiconductor - refactoring
11
 *     Patrick Chuong (Texas Instruments) - Bug fix (329682)
11
 *******************************************************************************/
12
 *******************************************************************************/
12
package org.eclipse.cdt.debug.internal.ui.disassembly.dsf;
13
package org.eclipse.cdt.debug.internal.ui.disassembly.dsf;
13
14
Lines 141-146 Link Here
141
	Object insertSource(Position pos, BigInteger address, final String file, int lineNumber);
142
	Object insertSource(Position pos, BigInteger address, final String file, int lineNumber);
142
143
143
	void gotoSymbol(String symbol);
144
	void gotoSymbol(String symbol);
145
	
146
	/**
147
	 * Evaluate the symbol address.
148
	 * 
149
	 * @param symbol the symbol
150
	 * @param suppressError true to suppress error dialogs
151
	 * @return the address, <code>null</code> if failed to evaluate symbol
152
	 */
153
	BigInteger evaluateSymbolAddress(String symbol, boolean suppressError);
144
154
145
	/**
155
	/**
146
	 * Retrieves disassembly of the code generated by a source file, starting at
156
	 * Retrieves disassembly of the code generated by a source file, starting at
(-)src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyBackendDsf.java (-41 / +89 lines)
Lines 9-14 Link Here
9
 *     Wind River Systems - initial API and implementation
9
 *     Wind River Systems - initial API and implementation
10
 *     Freescale Semiconductor - refactoring
10
 *     Freescale Semiconductor - refactoring
11
 *     Patrick Chuong (Texas Instruments) - Bug 323279
11
 *     Patrick Chuong (Texas Instruments) - Bug 323279
12
 *     Patrick Chuong (Texas Instruments) - Bug fix (329682)
12
 *******************************************************************************/
13
 *******************************************************************************/
13
package org.eclipse.cdt.dsf.debug.internal.ui.disassembly;
14
package org.eclipse.cdt.dsf.debug.internal.ui.disassembly;
14
15
Lines 29-34 Link Here
29
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
30
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
30
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
31
import org.eclipse.cdt.dsf.concurrent.DsfExecutor;
31
import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
32
import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
33
import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
32
import org.eclipse.cdt.dsf.concurrent.Query;
34
import org.eclipse.cdt.dsf.concurrent.Query;
33
import org.eclipse.cdt.dsf.datamodel.DMContexts;
35
import org.eclipse.cdt.dsf.datamodel.DMContexts;
34
import org.eclipse.cdt.dsf.datamodel.IDMContext;
36
import org.eclipse.cdt.dsf.datamodel.IDMContext;
Lines 61-66 Link Here
61
import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
63
import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
62
import org.eclipse.core.runtime.IAdaptable;
64
import org.eclipse.core.runtime.IAdaptable;
63
import org.eclipse.core.runtime.IStatus;
65
import org.eclipse.core.runtime.IStatus;
66
import org.eclipse.core.runtime.Status;
64
import org.eclipse.jface.dialogs.ErrorDialog;
67
import org.eclipse.jface.dialogs.ErrorDialog;
65
import org.eclipse.jface.text.BadLocationException;
68
import org.eclipse.jface.text.BadLocationException;
66
import org.eclipse.jface.text.Position;
69
import org.eclipse.jface.text.Position;
Lines 861-917 Link Here
861
	 * @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#gotoSymbol(java.lang.String)
864
	 * @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#gotoSymbol(java.lang.String)
862
	 */
865
	 */
863
	public void gotoSymbol(final String symbol) {
866
	public void gotoSymbol(final String symbol) {
864
		final DsfExecutor executor= getSession().getExecutor();
867
		evaluateSymbolAddress(symbol, false, new DataRequestMonitor<BigInteger>(getSession().getExecutor(), null) {			
865
		executor.execute(new DsfRunnable() {
868
			@Override
866
			public void run() {
869
			protected void handleSuccess() {
867
				final IExpressions expressions= getService(IExpressions.class);
870
				final BigInteger address = getData();
868
				if (expressions == null) {
871
				if (address != null) {
869
					return;
872
					fCallback.asyncExec(new Runnable() {
873
						public void run() {
874
							fCallback.gotoAddress(address);
875
						}});
870
				}
876
				}
871
				final IExpressionDMContext exprDmc= expressions.createExpression(fTargetContext, symbol);
877
			}
872
				// first, try to get l-value address
878
		});
873
				expressions.getExpressionAddressData(exprDmc, new DataRequestMonitor<IExpressionDMAddress>(executor, null) {
879
	}
880
881
	/*
882
	 * (non-Javadoc)
883
	 * @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#evaluateSymbolAddress(java.lang.String, boolean)
884
	 */
885
	public BigInteger evaluateSymbolAddress(final String symbol, final boolean suppressError) {
886
		Query<BigInteger> query = new Query<BigInteger>() {
887
			@Override
888
			protected void execute(DataRequestMonitor<BigInteger> rm) {
889
				evaluateSymbolAddress(symbol, suppressError, rm);				
890
			}			
891
		};
892
		getSession().getExecutor().execute(query);
893
		try {
894
			return query.get();
895
		} catch (Exception e) {
896
			return null;
897
		}
898
	}
899
	
900
	private void evaluateSymbolAddress(final String symbol, final boolean suppressError, final DataRequestMonitor<BigInteger> rm) {		
901
		final IExpressions expressions= getService(IExpressions.class);
902
		if (expressions == null) {
903
			rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "", null)); //$NON-NLS-1$
904
			rm.done();
905
			return;
906
		}
907
		
908
		final IExpressionDMContext exprDmc= expressions.createExpression(fTargetContext, symbol);
909
		// first, try to get l-value address
910
		expressions.getExpressionAddressData(exprDmc, new DataRequestMonitor<IExpressionDMAddress>(getSession().getExecutor(), null) {
911
			@Override
912
			protected void handleSuccess() {
913
				IExpressionDMAddress data = getData();
914
				IAddress address = data.getAddress();
915
				rm.setData(address.getValue());
916
				rm.done();
917
			}
918
			@Override
919
			protected void handleError() {
920
				// not an l-value, evaluate expression
921
				final FormattedValueDMContext valueDmc= expressions.getFormattedValueContext(exprDmc, IFormattedValues.HEX_FORMAT);
922
				expressions.getFormattedExpressionValue(valueDmc, new DataRequestMonitor<FormattedValueDMData>(getSession().getExecutor(), null) {
874
					@Override
923
					@Override
875
					protected void handleSuccess() {
924
					protected void handleSuccess() {
876
						IExpressionDMAddress data = getData();
925
						FormattedValueDMData data= getData();
877
						final IAddress address = data.getAddress();
926
						String value= data.getFormattedValue();
878
						if (address != null) {
927
						BigInteger address= null;
879
							fCallback.asyncExec(new Runnable() {
928
						try {
880
								public void run() {
929
							address = DisassemblyUtils.decodeAddress(value);
881
									fCallback.gotoAddress(address.getValue());
930
						} catch (final Exception e) {
882
								}});
931
							// "value" can be empty i.e *fooX, where fooX is a variable.
932
							// Not sure if this is a bug or not. So, fail the request instead.
933
							rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "", null)); //$NON-NLS-1$
934
							
935
							if (!suppressError) {
936
								fCallback.asyncExec(new Runnable() {
937
									public void run() {
938
						                ErrorDialog.openError(fCallback.getSite().getShell(), "Error", null,  //$NON-NLS-1$
939
						                		new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, 
940
						                		"Symbol does not evaluate to an address (" + e.getMessage() + ")", null)); //$NON-NLS-1$ //$NON-NLS-2$
941
									}});
942
							}							
883
						}
943
						}
944
						rm.setData(address);
945
						rm.done();
884
					}
946
					}
885
					@Override
947
					@Override
886
					protected void handleError() {
948
					protected void handleError() {
887
						// not an l-value, evaluate expression
949
						if (!suppressError) {
888
						final FormattedValueDMContext valueDmc= expressions.getFormattedValueContext(exprDmc, IFormattedValues.HEX_FORMAT);
950
							fCallback.asyncExec(new Runnable() {
889
						expressions.getFormattedExpressionValue(valueDmc, new DataRequestMonitor<FormattedValueDMData>(executor, null) {
951
								public void run() {
890
							@Override
952
					                ErrorDialog.openError(fCallback.getSite().getShell(), "Error", null, getStatus()); //$NON-NLS-1$
891
							protected void handleSuccess() {
953
								}});
892
								FormattedValueDMData data= getData();
954
						}
893
								final String value= data.getFormattedValue();
955
						rm.setStatus(new Status(IStatus.ERROR, DsfUIPlugin.PLUGIN_ID, IDsfStatusConstants.REQUEST_FAILED, "", null)); //$NON-NLS-1$
894
								final BigInteger address= DisassemblyUtils.decodeAddress(value);
956
						rm.done();
895
								if (address != null) {
896
									fCallback.asyncExec(new Runnable() {
897
										public void run() {
898
											fCallback.gotoAddress(address);
899
										}});
900
								}
901
							}
902
							@Override
903
							protected void handleError() {
904
								fCallback.asyncExec(new Runnable() {
905
									public void run() {
906
						                ErrorDialog.openError(fCallback.getSite().getShell(), "Error", null, getStatus()); //$NON-NLS-1$
907
									}});
908
							}
909
						});
910
					}
957
					}
911
				});
958
				});
912
			}});
959
			}
960
		});
913
	}
961
	}
914
962
	
915
	/* (non-Javadoc)
963
	/* (non-Javadoc)
916
	 * @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#retrieveDisassembly(java.lang.String, int, java.math.BigInteger, boolean, boolean, boolean)
964
	 * @see org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend#retrieveDisassembly(java.lang.String, int, java.math.BigInteger, boolean, boolean, boolean)
917
	 */
965
	 */
(-)src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java (-17 / +13 lines)
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     Wind River Systems - initial API and implementation
9
 *     Wind River Systems - initial API and implementation
10
 *     Patrick Chuong (Texas Instruments) - Bug fix (326670)
10
 *     Patrick Chuong (Texas Instruments) - Bug fix (326670)
11
 *    Patrick Chuong (Texas Instruments) - Bug fix (329682)
11
 *******************************************************************************/
12
 *******************************************************************************/
12
package org.eclipse.cdt.dsf.debug.internal.ui.disassembly;
13
package org.eclipse.cdt.dsf.debug.internal.ui.disassembly;
13
14
Lines 23-35 Link Here
23
import java.util.List;
24
import java.util.List;
24
import java.util.ListIterator;
25
import java.util.ListIterator;
25
import java.util.Map;
26
import java.util.Map;
26
import java.util.StringTokenizer;
27
27
28
import org.eclipse.cdt.core.IAddress;
28
import org.eclipse.cdt.core.IAddress;
29
import org.eclipse.cdt.core.model.ITranslationUnit;
29
import org.eclipse.cdt.core.model.ITranslationUnit;
30
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.AddressRangePosition;
30
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.AddressRangePosition;
31
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyPosition;
31
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyPosition;
32
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.DisassemblyUtils;
33
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.ErrorPosition;
32
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.ErrorPosition;
34
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend;
33
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend;
35
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyDocument;
34
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyDocument;
Lines 1481-1486 Link Here
1481
					if (fUpdatePending) {
1480
					if (fUpdatePending) {
1482
						fUpdatePending = false;
1481
						fUpdatePending = false;
1483
						updateVisibleArea();
1482
						updateVisibleArea();
1483
						fPCLastAddress = getTopAddress();
1484
					}
1484
					}
1485
				}
1485
				}
1486
			});
1486
			});
Lines 2122-2128 Link Here
2122
		if (!isSyncWithActiveDebugContext()) {
2122
		if (!isSyncWithActiveDebugContext()) {
2123
			if (isTrackExpression()) {
2123
			if (isTrackExpression()) {
2124
				if (!DisassemblyMessages.Disassembly_GotoLocation_initial_text.equals(fPCLastLocationTxt))
2124
				if (!DisassemblyMessages.Disassembly_GotoLocation_initial_text.equals(fPCLastLocationTxt))
2125
					fPCLastAddress = eval(fPCLastLocationTxt);
2125
					fPCLastAddress = eval(fPCLastLocationTxt, true);
2126
			}
2126
			}
2127
			if (fPCLastAddress != PC_UNKNOWN) {
2127
			if (fPCLastAddress != PC_UNKNOWN) {
2128
				address = fPCLastAddress;
2128
				address = fPCLastAddress;
Lines 2130-2136 Link Here
2130
			    fPCLastAddress = address;
2130
			    fPCLastAddress = address;
2131
			}
2131
			}
2132
			
2132
			
2133
			frame = -2; // clear the annotation
2133
			// need to get the frame address when the view first started.
2134
			if (fPCLastAddress != PC_UNKNOWN)
2135
				frame = -2; // clear the annotation
2134
		} else {
2136
		} else {
2135
			fPCLastAddress = address;
2137
			fPCLastAddress = address;
2136
		}
2138
		}
Lines 2960-2978 Link Here
2960
		return ""; //$NON-NLS-1$
2962
		return ""; //$NON-NLS-1$
2961
	}
2963
	}
2962
	
2964
	
2963
	public BigInteger eval(String expr) {
2965
	public BigInteger eval(String expr, boolean suppressError) {
2964
		String location = evaluateExpression(expr);
2966
		if (fBackend != null) {
2965
    	if (location != null) {
2967
			BigInteger address = fBackend.evaluateSymbolAddress(expr, suppressError);
2966
    		StringTokenizer st = new StringTokenizer(location);
2968
			if (address != null)
2967
    		if (st.hasMoreTokens()) {
2969
				return address;
2968
    			try {
2970
		}
2969
    				return DisassemblyUtils.decodeAddress(st.nextToken());
2971
		return PC_UNKNOWN;    	
2970
    			} catch (Exception e) {
2971
    				logWarning("Failed to evaluate expression " + expr, e); //$NON-NLS-1$
2972
    			}
2973
    		}
2974
    	}
2975
    	return PC_UNKNOWN;
2976
	}
2972
	}
2977
2973
2978
	protected boolean isTrackExpression() {
2974
	protected boolean isTrackExpression() {
(-)src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AddressBarContributionItem.java (-3 / +8 lines)
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     Texas Instruments - Initial API and implementation
9
 *     Texas Instruments - Initial API and implementation
10
 *     Patrick Chuong (Texas Instruments) - Bug fix (329682)
10
 *******************************************************************************/
11
 *******************************************************************************/
11
package org.eclipse.cdt.dsf.debug.internal.ui.disassembly.actions;
12
package org.eclipse.cdt.dsf.debug.internal.ui.disassembly.actions;
12
13
Lines 46-51 Link Here
46
	private ToolItem item;
47
	private ToolItem item;
47
	private int width;
48
	private int width;
48
	private String initialText;
49
	private String initialText;
50
	private String lastText;
49
	private Image warningImage = null;
51
	private Image warningImage = null;
50
	private Label warningLabel = null;
52
	private Label warningLabel = null;
51
	private String warningText = null;
53
	private String warningText = null;
Lines 80-85 Link Here
80
			String warningText) {
82
			String warningText) {
81
		this.width = width;
83
		this.width = width;
82
		this.initialText = initialText;
84
		this.initialText = initialText;
85
		this.lastText = initialText;
83
		this.warningText = warningText;
86
		this.warningText = warningText;
84
		fill(parent, 0);
87
		fill(parent, 0);
85
88
Lines 237-244 Link Here
237
					((JumpToAddressAction)action).deactivateDisassemblyContext();				
240
					((JumpToAddressAction)action).deactivateDisassemblyContext();				
238
				// end 297387
241
				// end 297387
239
				
242
				
243
				lastText = addressBox.getText();
244
				
240
				// Erase the guide text when the focus is gained.
245
				// Erase the guide text when the focus is gained.
241
				if (addressBox.getText().trim().equals(initialText))
246
				if (lastText.trim().equals(initialText))
242
					addressBox.setText(""); //$NON-NLS-1$
247
					addressBox.setText(""); //$NON-NLS-1$
243
248
244
				// [nmehregani]: Support Ctrl+C in address bar
249
				// [nmehregani]: Support Ctrl+C in address bar
Lines 251-260 Link Here
251
					((JumpToAddressAction)action).activateDisassemblyContext();				
256
					((JumpToAddressAction)action).activateDisassemblyContext();				
252
				// end 297387
257
				// end 297387
253
				
258
				
254
				// Re-insert the guide text when the focus is lost and the text
259
				// Re-insert the last text when the focus is lost and the text
255
				// field is empty.
260
				// field is empty.
256
				if (addressBox.getText().trim().length() == 0)
261
				if (addressBox.getText().trim().length() == 0)
257
					addressBox.setText(initialText);
262
					addressBox.setText(lastText);
258
263
259
				// [nmehregani]: Support Ctrl+C in address bar
264
				// [nmehregani]: Support Ctrl+C in address bar
260
				addressBox.removeKeyListener(keyListener);
265
				addressBox.removeKeyListener(keyListener);
(-)src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/JumpToAddressAction.java (-2 / +2 lines)
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     Texas Instruments[nmehregani] - initial API and implementation
9
 *     Texas Instruments[nmehregani] - initial API and implementation
10
 *     Patrick Chuong (Texas Instruments) - Bug fix (326670)
10
 *     Patrick Chuong (Texas Instruments) - Bug fix (326670)
11
 *     Patrick Chuong (Texas Instruments) - Bug fix (329682)
11
 *******************************************************************************/
12
 *******************************************************************************/
12
13
13
package org.eclipse.cdt.dsf.debug.internal.ui.disassembly.actions;
14
package org.eclipse.cdt.dsf.debug.internal.ui.disassembly.actions;
Lines 42-51 Link Here
42
        		return;
43
        		return;
43
        	}
44
        	}
44
45
45
        	BigInteger address = fDisassemblyPart.eval(locationTxt);
46
        	BigInteger address = fDisassemblyPart.eval(locationTxt, false);
46
			if (address.compareTo(BigInteger.ZERO) < 0) {
47
			if (address.compareTo(BigInteger.ZERO) < 0) {
47
				addressBar.setWarningIconVisible(true);
48
				addressBar.setWarningIconVisible(true);
48
				fDisassemblyPart.generateErrorDialog(DisassemblyMessages.Disassembly_GotoAddressDialog_error_invalid_address);
49
			} else {        				
49
			} else {        				
50
				fDisassemblyPart.gotoLocationByUser(address, locationTxt);
50
				fDisassemblyPart.gotoLocationByUser(address, locationTxt);
51
				addressBar.setWarningIconVisible(false);
51
				addressBar.setWarningIconVisible(false);

Return to bug 329682